summaryrefslogtreecommitdiff
path: root/app/Models/Auth.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-07-07 22:36:27 +0200
committerGravatar GitHub <noreply@github.com> 2023-07-07 22:36:27 +0200
commitf8f163d054110f7e0ff6650fca146b474335f4bd (patch)
treedbd831e600bc76ca2830cd417bd52b712ff97309 /app/Models/Auth.php
parent7f9594b8c7d7799f2e5f89328bd5981410db8cf0 (diff)
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 <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/Auth.php')
-rw-r--r--app/Models/Auth.php4
1 files changed, 2 insertions, 2 deletions
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;