fix: make CSRF tokens exist for the duration of the session

This commit is contained in:
Floorb 2023-07-11 03:20:58 -04:00
parent 894613e257
commit 483d0293f7
2 changed files with 2 additions and 6 deletions

View file

@ -218,11 +218,7 @@ function verifyCsrfToken($token = null) : bool {
return false; return false;
} }
$success = hash_equals($_SESSION[SessionHelper::CSRF_TOKEN_KEY], $token); return hash_equals($_SESSION[SessionHelper::CSRF_TOKEN_KEY], $token);
unset($_SESSION[SessionHelper::CSRF_TOKEN_KEY]);
return $success;
} }
session_start(); session_start();