From f8f163d054110f7e0ff6650fca146b474335f4bd Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:36:27 +0200 Subject: Chore/processing of depreciations and updating code to php72 minimum (#5504) * processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc Co-authored-by: Alexandre Alapetite --- app/Models/Auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models/Auth.php') diff --git a/app/Models/Auth.php b/app/Models/Auth.php index d048460f6..f3c8b52f9 100644 --- a/app/Models/Auth.php +++ b/app/Models/Auth.php @@ -7,7 +7,7 @@ class FreshRSS_Auth { /** * Determines if user is connected. */ - const DEFAULT_COOKIE_DURATION = 7776000; + public const DEFAULT_COOKIE_DURATION = 7776000; /** @var bool */ private static $login_ok = false; @@ -216,7 +216,7 @@ class FreshRSS_Auth { $csrf = Minz_Session::param('csrf'); if ($csrf == '') { $salt = FreshRSS_Context::$system_conf->salt; - $csrf = sha1($salt . uniqid('' . mt_rand(), true)); + $csrf = sha1($salt . uniqid('' . random_int(0, mt_getrandmax()), true)); Minz_Session::_param('csrf', $csrf); } return $csrf; -- cgit v1.2.3