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 22
22
use Symfony \Component \Security \Core \Exception \AuthenticationException ;
23
23
use Symfony \Component \Security \Core \Exception \BadCredentialsException ;
24
24
use Symfony \Component \Security \Core \Exception \CustomUserMessageAccountStatusException ;
25
- use Symfony \Component \Security \Core \Exception \UsernameNotFoundException ;
25
+ use Symfony \Component \Security \Core \Exception \UserNotFoundException ;
26
26
use Symfony \Component \Security \Core \User \UserInterface ;
27
27
use Symfony \Component \Security \Http \Authenticator \AuthenticatorInterface ;
28
28
use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticator ;
@@ -268,7 +268,7 @@ private function handleAuthenticationFailure(AuthenticationException $authentica
268
268
269
269
// Avoid leaking error details in case of invalid user (e.g. user not found or invalid account status)
270
270
// 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))) {
272
272
$ authenticationException = new BadCredentialsException ('Bad credentials. ' , 0 , $ authenticationException );
273
273
}
274
274
You can’t perform that action at this time.
0 commit comments