From abe212c7ad30f273921cf7703de10930beb6bde1 Mon Sep 17 00:00:00 2001 From: vcarroy Date: Thu, 6 Jun 2024 10:36:21 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20v=C3=A9rification=20du=20mdp=20en=20cas?= =?UTF-8?q?=20de=20mdp=20non=20d=C3=A9fini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Security/SQLLoginUserAuthenticator.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Security/SQLLoginUserAuthenticator.php b/src/Security/SQLLoginUserAuthenticator.php index 6670214..239f94e 100644 --- a/src/Security/SQLLoginUserAuthenticator.php +++ b/src/Security/SQLLoginUserAuthenticator.php @@ -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);