diff --git a/src/PasswordHasher/LegacyPasswordHasher.php b/src/PasswordHasher/LegacyPasswordHasher.php index 9d1b256b..12684dda 100644 --- a/src/PasswordHasher/LegacyPasswordHasher.php +++ b/src/PasswordHasher/LegacyPasswordHasher.php @@ -73,6 +73,6 @@ public function hash($password): string */ public function check($password, string $hashedPassword): bool { - return $hashedPassword === $this->hash($password); + return hash_equals($hashedPassword, $this->hash($password)); } }