mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
fix(Authorization): Skipped Autorization Header that are not Basic
This commit is contained in:
parent
708136da46
commit
a0129b437e
1 changed files with 4 additions and 0 deletions
|
@ -271,6 +271,10 @@ function refresh_logged_in()
|
||||||
|
|
||||||
if auth_header then
|
if auth_header then
|
||||||
_, _, b64_cred = string.find(auth_header, "^Basic%s+(.+)$")
|
_, _, 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, password = string.find(ngx.decode_base64(b64_cred), "^(.+):(.+)$")
|
||||||
user = authenticate(user, password)
|
user = authenticate(user, password)
|
||||||
if user then
|
if user then
|
||||||
|
|
Loading…
Reference in a new issue