diff --git a/inc/auth.class.php b/inc/auth.class.php index c779441ed0a..0ed1aa19d32 100644 --- a/inc/auth.class.php +++ b/inc/auth.class.php @@ -276,14 +276,14 @@ static function checkPassword($pass, $hash) { $ok = password_verify($pass, $hash); } else if (strlen($hash)==32) { - $ok = md5($pass) == $hash; + $ok = md5($pass) === $hash; } else if (strlen($hash)==40) { - $ok = sha1($pass) == $hash; + $ok = sha1($pass) === $hash; } else { $salt = substr($hash, 0, 8); - $ok = ($salt.sha1($salt.$pass) == $hash); + $ok = ($salt.sha1($salt.$pass) === $hash); } return $ok;