diff options
Diffstat (limited to 'app/Models/FormAuth.php')
| -rw-r--r-- | app/Models/FormAuth.php | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ <?php class FreshRSS_FormAuth { - public static function checkCredentials($username, $hash, $nonce, $challenge) { + public static function checkCredentials(string $username, string $hash, string $nonce, string $challenge): bool { if (!FreshRSS_user_Controller::checkUsername($username) || !ctype_graph($hash) || !ctype_graph($challenge) || @@ -36,7 +36,7 @@ class FreshRSS_FormAuth { return []; } - private static function renewCookie($token) { + private static function renewCookie(string $token) { $token_file = DATA_PATH . '/tokens/' . $token . '.txt'; if (touch($token_file)) { $limits = FreshRSS_Context::$system_conf->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'; |
