De 'Basic' van basic authentication hoort case-insensitive te zijn

https://github.com/rails/rails/issues/21199

svn path=/Website/branches/v2017.2/; revision=35988
This commit is contained in:
Jos Groot Lipman
2017-11-14 13:34:50 +00:00
parent 57c7127e8f
commit 29ff32779f

View File

@@ -87,7 +87,7 @@ if (user_key < 0)
if (user_key < 0) if (user_key < 0)
{ {
var auth = String(Request.ServerVariables("HTTP_AUTHORIZATION")); var auth = String(Request.ServerVariables("HTTP_AUTHORIZATION"));
if (auth.match(/^Basic /)) if (auth.match(/^Basic /i))
{ {
var b64 = auth.substring(6); var b64 = auth.substring(6);
var plain = decode_b64(b64); var plain = decode_b64(b64);