From 47e242aa77bb8583e8716023c4bcef0462891ebd Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 30 Jan 2022 15:53:17 +0100 Subject: Fix ctype_alnum (#4182) * Fix ctype_alnum #fix https://github.com/FreshRSS/FreshRSS/issues/4180 Ensure `ctype_alnum()` gets a string * Changelog --- app/Models/FormAuth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Models/FormAuth.php') diff --git a/app/Models/FormAuth.php b/app/Models/FormAuth.php index d6da637d1..653eba04b 100644 --- a/app/Models/FormAuth.php +++ b/app/Models/FormAuth.php @@ -1,7 +1,7 @@ limits; @@ -48,7 +48,7 @@ class FreshRSS_FormAuth { return false; } - public static function makeCookie($username, $password_hash) { + public static function makeCookie(string $username, string $password_hash) { do { $token = sha1(FreshRSS_Context::$system_conf->salt . $username . uniqid('' . mt_rand(), true)); $token_file = DATA_PATH . '/tokens/' . $token . '.txt'; -- cgit v1.2.3