mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 18:25:55 +00:00
Improve missing token check
Avoid "E_NOTICE (8) (classes/userhelper.php:78) Undefined index: csrf_token" in logs.
This commit is contained in:
@@ -75,7 +75,7 @@ class UserHelper {
|
|||||||
|
|
||||||
$_SESSION["auth_module"] = false;
|
$_SESSION["auth_module"] = false;
|
||||||
|
|
||||||
if (!$_SESSION["csrf_token"])
|
if (empty($_SESSION["csrf_token"]))
|
||||||
$_SESSION["csrf_token"] = bin2hex(get_random_bytes(16));
|
$_SESSION["csrf_token"] = bin2hex(get_random_bytes(16));
|
||||||
|
|
||||||
$_SESSION["ip_address"] = UserHelper::get_user_ip();
|
$_SESSION["ip_address"] = UserHelper::get_user_ip();
|
||||||
|
|||||||
Reference in New Issue
Block a user