File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2222use Symfony \Component \Security \Core \Exception \AuthenticationException ;
2323use Symfony \Component \Security \Core \Exception \BadCredentialsException ;
2424use Symfony \Component \Security \Core \Exception \CustomUserMessageAccountStatusException ;
25- use Symfony \Component \Security \Core \Exception \UsernameNotFoundException ;
25+ use Symfony \Component \Security \Core \Exception \UserNotFoundException ;
2626use Symfony \Component \Security \Core \User \UserInterface ;
2727use Symfony \Component \Security \Http \Authenticator \AuthenticatorInterface ;
2828use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticator ;
@@ -268,7 +268,7 @@ private function handleAuthenticationFailure(AuthenticationException $authentica
268268
269269 // Avoid leaking error details in case of invalid user (e.g. user not found or invalid account status)
270270 // to prevent user enumeration via response content comparison
271- if ($ this ->hideUserNotFoundExceptions && ($ authenticationException instanceof UsernameNotFoundException || ($ authenticationException instanceof AccountStatusException && !$ authenticationException instanceof CustomUserMessageAccountStatusException))) {
271+ if ($ this ->hideUserNotFoundExceptions && ($ authenticationException instanceof UserNotFoundException || ($ authenticationException instanceof AccountStatusException && !$ authenticationException instanceof CustomUserMessageAccountStatusException))) {
272272 $ authenticationException = new BadCredentialsException ('Bad credentials. ' , 0 , $ authenticationException );
273273 }
274274
You can’t perform that action at this time.
0 commit comments