fix verify password methode ssha #11

Merged
rmasson merged 1 commits from themeConfig into develop 2023-01-11 10:32:41 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ class PasswordEncoder implements LegacyPasswordHasherInterface
$completedPassword = $this->getPasswordToHash($plainPassword, $salt); $completedPassword = $this->getPasswordToHash($plainPassword, $salt);
foreach ($this->hashAlgoLegacy as $algo) { foreach ($this->hashAlgoLegacy as $algo) {
if ('ssha' === $algo) { if ('ssha' === $algo && $this->compareSsha($hashedPassword, $completedPassword)) {
return $this->compareSsha($hashedPassword, $completedPassword); return true;
} }
if ($this->isObsoleteAlgo($algo)) { if ($this->isObsoleteAlgo($algo)) {
if (hash_equals(hash($algo, $completedPassword), $hashedPassword)) { if (hash_equals(hash($algo, $completedPassword), $hashedPassword)) {