do not compare the same thing several times

This commit is contained in:
Kay0u 2020-06-18 14:48:14 +02:00
parent 397f7b3910
commit fb45cd0441
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -248,12 +248,12 @@ function refresh_logged_in()
user.. user..
"|"..expireTime.. "|"..expireTime..
"|"..session_key) "|"..session_key)
if hash ~= authHash then is_logged_in = hash == authHash
if not is_logged_in then
logger.info("Hash "..authHash.." rejected for "..user.."@"..ngx.var.remote_addr) logger.info("Hash "..authHash.." rejected for "..user.."@"..ngx.var.remote_addr)
else else
authUser = user authUser = user
end end
is_logged_in = hash == authHash
return is_logged_in return is_logged_in
end end
end end