From a0129b437e332413dd9df8b02b16ec383ae5d499 Mon Sep 17 00:00:00 2001 From: titoko Date: Sat, 12 Dec 2020 14:23:46 +0100 Subject: [PATCH] fix(Authorization): Skipped Autorization Header that are not Basic --- helpers.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpers.lua b/helpers.lua index 0fcd332..004a912 100644 --- a/helpers.lua +++ b/helpers.lua @@ -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