fix(Authorization): Skipped Autorization Header that are not Basic

This commit is contained in:
titoko 2020-12-12 14:23:46 +01:00 committed by GitHub
parent 708136da46
commit a0129b437e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -271,6 +271,10 @@ function refresh_logged_in()
if auth_header then
_, _, b64_cred = string.find(auth_header, "^Basic%s+(.+)$")
if b64_cred == nil:
is_logged_in = false
return is_logged_in
end
_, _, user, password = string.find(ngx.decode_base64(b64_cred), "^(.+):(.+)$")
user = authenticate(user, password)
if user then