mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:40:00 +08:00
clarify base64 sso error message
This commit is contained in:
parent
1f0e8e441b
commit
132713850a
|
@ -24,7 +24,7 @@ class SingleSignOn
|
||||||
if sso.sign(parsed["sso"]) != parsed["sig"]
|
if sso.sign(parsed["sso"]) != parsed["sig"]
|
||||||
diags = "\n\nsso: #{parsed["sso"]}\n\nsig: #{parsed["sig"]}\n\nexpected sig: #{sso.sign(parsed["sso"])}"
|
diags = "\n\nsso: #{parsed["sso"]}\n\nsig: #{parsed["sig"]}\n\nexpected sig: #{sso.sign(parsed["sso"])}"
|
||||||
if parsed["sso"] =~ /[^a-zA-Z0-9=\r\n\/+]/m
|
if parsed["sso"] =~ /[^a-zA-Z0-9=\r\n\/+]/m
|
||||||
raise RuntimeError, "The SSO field should be Base64 encoded, using only A-Z, a-z, 0-9 and = characters. Your input contains characters we don't understand as Base64, see http://en.wikipedia.org/wiki/Base64 #{diags}"
|
raise RuntimeError, "The SSO field should be Base64 encoded, using only A-Z, a-z, 0-9, +, /, and = characters. Your input contains characters we don't understand as Base64, see http://en.wikipedia.org/wiki/Base64 #{diags}"
|
||||||
else
|
else
|
||||||
raise RuntimeError, "Bad signature for payload #{diags}"
|
raise RuntimeError, "Bad signature for payload #{diags}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user