fix: vérification du mdp en cas de mdp non défini
Some checks reported warnings
Cadoles/hydra-sql/pipeline/head This commit is unstable
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable

This commit is contained in:
Valentin Carroy 2024-06-06 10:36:21 +02:00
parent 890c44da0c
commit abe212c7ad

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);