From 6777fbf229200f4fd566022e186548391219ab23 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 22 Feb 2023 09:35:27 +0100 Subject: [PATCH] type-safe comparsion of md5-compatibility hash-validation Signed-off-by: Michael Kaufmann --- lib/Froxlor/System/Crypt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Froxlor/System/Crypt.php b/lib/Froxlor/System/Crypt.php index 9faf82f5..0ca6b676 100644 --- a/lib/Froxlor/System/Crypt.php +++ b/lib/Froxlor/System/Crypt.php @@ -198,7 +198,7 @@ class Crypt $update_hash = true; } - if ($pwd_hash == $pwd_check || password_verify($password, $pwd_hash)) { + if ($pwd_hash === $pwd_check || password_verify($password, $pwd_hash)) { // check for update of hash (only if our database is ready to handle the bigger string) $is_ready = Froxlor::versionCompare2("0.9.33", Froxlor::getVersion()) <= 0; if ((password_needs_rehash($pwd_hash, $algo) || $update_hash) && $is_ready) {