fix: vérification du mdp en cas de mdp non défini #37

Merged
mlamalle merged 1 commits from issue-mse-3699 into develop 2024-06-06 13:43:15 +02:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit abe212c7ad - Show all commits

View File

@ -84,9 +84,11 @@ class SQLLoginUserAuthenticator extends AbstractLoginFormAuthenticator
$request->getSession()->set(self::ERROR_LOGIN, true);
throw new AuthenticationException();
}
if (!$remoteHashedPassword) {
throw new Exception('Erreur inconnue');
if (null === $remoteHashedPassword) {
$remoteHashedPassword = "";
}
try {
// Comparaison remote hash et hash du input password + salt
$this->passwordHasher->verify($remoteHashedPassword, $plaintextPassword, $remoteSalt);