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 d136471 commit 4a80214Copy full SHA for 4a80214
lib/onelogin/ruby-saml/saml_message.rb
@@ -76,7 +76,8 @@ def encode(encoded)
76
# The function is not strict and does allow newline. This is because some SAML implementations
77
# uses newline in the base64-encoded data, even if they shouldn't have (RFC4648).
78
def is_base64?(string)
79
- string.match(%r{\A(([A-Za-z0-9+/]{4})|\n)*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)\Z})
+ string = string.gsub(/\r\n/, "").gsub(/\n/, "")
80
+ string.match(%r{\A(([A-Za-z0-9+/]{4}))*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)\Z})
81
end
82
83
def escape(unescaped)
0 commit comments