Compare commits

..

2 Commits

Author SHA1 Message Date
Matthieu Lamalle 769e7ed59e Merge pull request 'fix: vérification du mdp en cas de mdp non défini' (#37) from issue-mse-3699 into develop
Cadoles/hydra-sql/pipeline/head This commit is unstable Details
Reviewed-on: #37
Reviewed-by: Matthieu Lamalle <mlamalle@cadoles.com>
2024-06-06 13:43:13 +02:00
Valentin Carroy abe212c7ad fix: vérification du mdp en cas de mdp non défini
Cadoles/hydra-sql/pipeline/head This commit is unstable Details
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable Details
2024-06-06 10:36:21 +02:00
1 changed files with 4 additions and 2 deletions

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