mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Epic bug because some vars not initialized as nil
This commit is contained in:
parent
5ed18f7b84
commit
a44988a120
1 changed files with 5 additions and 1 deletions
|
@ -97,6 +97,10 @@ end
|
||||||
-- - and/or auth_headers is enabled for this app
|
-- - and/or auth_headers is enabled for this app
|
||||||
-- ###########################################################################
|
-- ###########################################################################
|
||||||
|
|
||||||
|
local is_logged_in = nil
|
||||||
|
local authUser = nil
|
||||||
|
local authPasswordEnc = nil
|
||||||
|
|
||||||
function check_authentication()
|
function check_authentication()
|
||||||
|
|
||||||
-- cf. src/authenticators/ldap_ynhuser.py in YunoHost to see how the cookie is actually created
|
-- cf. src/authenticators/ldap_ynhuser.py in YunoHost to see how the cookie is actually created
|
||||||
|
@ -221,7 +225,7 @@ if permission == nil then
|
||||||
-- permission is public = everybody has access, no need to check auth
|
-- permission is public = everybody has access, no need to check auth
|
||||||
elseif permission["public"] then
|
elseif permission["public"] then
|
||||||
logger:debug("Someone tries to access "..ngx.var.uri.." (corresponding perm: "..permission["id"]..")")
|
logger:debug("Someone tries to access "..ngx.var.uri.." (corresponding perm: "..permission["id"]..")")
|
||||||
has_access = true
|
has_access = true
|
||||||
-- Check auth header, assume the route is protected
|
-- Check auth header, assume the route is protected
|
||||||
else
|
else
|
||||||
is_logged_in, authUser, authPasswordEnc = check_authentication()
|
is_logged_in, authUser, authPasswordEnc = check_authentication()
|
||||||
|
|
Loading…
Add table
Reference in a new issue