Skip to content

Commit 8071d6b

Browse files
Fix tests
1 parent 42ae624 commit 8071d6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Authentication/AuthenticatorManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2323
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
2424
use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException;
25-
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
25+
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
2626
use Symfony\Component\Security\Core\User\UserInterface;
2727
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
2828
use 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

0 commit comments

Comments
 (0)