bastelfreak
09/14/2022, 5:29 PMbastelfreak
09/14/2022, 5:30 PMprofessoruss
09/14/2022, 5:31 PMbastelfreak
09/14/2022, 5:35 PMprofessoruss
09/14/2022, 5:38 PMprofessoruss
09/14/2022, 5:38 PMbastelfreak
09/14/2022, 5:39 PMJohn Ratliff
09/14/2022, 6:44 PM$idp = urlescape($whitelists['InCommon'][$whitelist])
This is what I'm trying, but it says there is no such function urlescape.Dr Bunsen Honeydew
09/14/2022, 6:44 PMpuppetlabs-stdlib
module at https://forge.puppet.com/puppetlabs/stdlib?src=slack&channel=puppetJohn Ratliff
09/14/2022, 6:46 PMJohn Ratliff
09/14/2022, 7:01 PMnatemccurdy
09/14/2022, 7:04 PMnatemccurdy
09/14/2022, 7:05 PM%2F
?natemccurdy
09/14/2022, 7:05 PMJohn Ratliff
09/14/2022, 7:08 PM<https://mdq.incommon.org/entities/https://idp.login.iu.edu/idp/shibboleth>
The above URL is wrong. The below one is correct.
<https://mdq.incommon.org/entities/https:%2F%2Fidp.login.iu.edu%2Fidp%2Fshibboleth>
But I guess you're right, slashes are valid in a URI. I'll try just replacing the slashes in the last part.natemccurdy
09/14/2022, 7:09 PMvchepkov
09/14/2022, 7:22 PMirb(main):001:0> require 'cgi'
=> true
irb(main):002:0> CGI.escape('<https://mdq.incommon.org/entities/https://idp.login.iu.edu/idp/shibboleth>')
=> "https%3A%2F%2Fmdq.incommon.org%2Fentities%2Fhttps%3A%2F%2Fidp.login.iu.edu%2Fidp%2Fshibboleth"
vchepkov
09/14/2022, 7:24 PMrequire 'cgi'
Puppet::Functions.create_function('urlencode') do
dispatch :urlencode do
param 'String', :url
end
def urlencode(url)
CGI.escape(url)
end
end
vchepkov
09/14/2022, 7:24 PMurl_encode
was part of stdlib at some point, I could be wrongSlackbot
09/14/2022, 7:52 PMvchepkov
09/14/2022, 7:54 PMvchepkov
09/14/2022, 7:54 PMvchepkov
09/14/2022, 7:55 PMTom Hilburn
09/14/2022, 9:35 PMTom Hilburn
09/14/2022, 9:36 PMTom Hilburn
09/14/2022, 9:36 PMTom Hilburn
09/14/2022, 9:36 PMTom Hilburn
09/14/2022, 9:37 PMnatemccurdy
09/14/2022, 9:42 PMtemplatewrapper
? What’s that? Is that a custom function?Tom Hilburn
09/14/2022, 9:43 PM