We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b875d commit f366365Copy full SHA for f366365
1 file changed
lib/onelogin/ruby-saml/saml_message.rb
@@ -121,7 +121,11 @@ def decode(string)
121
# @return [String] The encoded string
122
#
123
def encode(string)
124
- Base64.encode64(string).gsub(/\n/, "")
+ if Base64.respond_to?('strict_encode64')
125
+ Base64.strict_encode64(string)
126
+ else
127
+ Base64.encode64(string).gsub(/\n/, "")
128
+ end
129
end
130
131
# Check if a string is base64 encoded
0 commit comments