Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Weblate 2021-08-14 23:36:54 +00:00
commit 00722e9a03

View file

@ -237,15 +237,23 @@ function refresh_logged_in()
"|"..expireTime.. "|"..expireTime..
"|"..session_key) "|"..session_key)
is_logged_in = hash == authHash is_logged_in = hash == authHash
if not is_logged_in then if is_logged_in then
logger.info("Hash "..authHash.." rejected for "..user.."@"..ngx.var.remote_addr)
else
authUser = user authUser = user
return true
else
failReason = "Hash not matching"
end end
return is_logged_in else
failReason = "No {user}-password entry in cache"
end end
else
failReason = "No session key"
end end
else
failReason = "Cookie expired"
end end
logger.debug("SSOwat cookies rejected for "..user.."@"..ngx.var.remote_addr.." : "..failReason)
return false
end end
-- If client set the `Proxy-Authorization` header before reaching the SSO, -- If client set the `Proxy-Authorization` header before reaching the SSO,