Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit d56e17f

Browse files
committed
Merge pull request #76 from vivek/master
Handle AX boolean value properly
2 parents 98aaa02 + d650762 commit d56e17f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/openid/util.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ def Util.from_base64(s)
4747
def Util.urlencode(args)
4848
a = []
4949
args.each do |key, val|
50-
val = '' unless val
50+
if val.nil?
51+
val = ''
52+
elsif !!val == val
53+
#it's boolean let's convert it to string representation
54+
# or else CGI::escape won't like it
55+
val = val.to_s
56+
end
57+
5158
a << (CGI::escape(key) + "=" + CGI::escape(val))
5259
end
5360
a.join("&")

0 commit comments

Comments
 (0)