From 6faf465733a209efdf4355579d97beb9d04937ce Mon Sep 17 00:00:00 2001 From: Gauthier DUPONT Date: Mon, 18 Aug 2025 10:53:35 +0200 Subject: [PATCH] fix(login) #59 : handle case earlier during login --- src/Security/SQLLoginUserAuthenticator.php | 2 +- src/Service/SQLLoginService.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Security/SQLLoginUserAuthenticator.php b/src/Security/SQLLoginUserAuthenticator.php index 649fc0e..d3ff9e0 100644 --- a/src/Security/SQLLoginUserAuthenticator.php +++ b/src/Security/SQLLoginUserAuthenticator.php @@ -60,7 +60,7 @@ class SQLLoginUserAuthenticator extends AbstractLoginFormAuthenticator public function authenticate(Request $request): SelfValidatingPassport { $form = $request->request->all(key: 'login'); - $login = $form['login']; + $login = \strtolower($form['login']); $plaintextPassword = $form['password']; $session = $request->getSession(); try { diff --git a/src/Service/SQLLoginService.php b/src/Service/SQLLoginService.php index 7e41ebf..0e97bbd 100644 --- a/src/Service/SQLLoginService.php +++ b/src/Service/SQLLoginService.php @@ -28,7 +28,6 @@ class SQLLoginService extends AbstractController public function fetchPasswordAndDatas(string $login): array { $dataRequest = $this->sqlLoginRequest->getDatasRequest(); - $login = \strtolower($login); $datas = $this->executeRequestWithLogin($dataRequest, $login); return $datas;