antibot - fix bug when session checks fail

This commit is contained in:
florian 2024-05-03 16:11:45 +02:00
parent bf2f52ae83
commit 24ec019141
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500

View file

@ -606,6 +606,7 @@ utils.get_session = function(ctx)
logger:log(ERR, "error while getting variable SESSIONS_CHECK_" .. check .. " : " .. err)
elseif check_value == "yes" and value ~= metadata[check] then
logger:log(WARN, "session check failed : " .. check .. "!=" .. metadata[check])
session:clear_request_cookie()
local ok
ok, err = session:destroy()
if not ok then