Skip to content

Commit 16c12d0

Browse files
Merge branch '6.0' into 6.1
* 6.0: (23 commits) Fix composer on appveyor fix bootstrap_3_layout ChoiceType's expanded label_html [Messenger][Security/Core] Remove legacy class aliases [PropertyAccess] Fix typo in PropertyAccessor::readProperty() DocBlock [PropertyInfo] PhpStanExtractor namespace missmatch issue [VarExporter] Fix exporting objects with readonly properties [ExpressionLanguage] Fix matches when the regexp is not valid [Messenger] Add mysql indexes back and work around deadlocks using soft-delete Add BC layer to handle old objects already present in cache [RateLimiter] Always store SlidingWindows with an expiration set [Validator] Fix File constraint invalid max size exception message [Console] Fix exit status on uncaught exception with negative code [Validator] fix #43345 @Assert\DivisibleBy [HttpClient] fix 303 after PUT and sending chunked requests [HttpClient] always send Content-Type when a body is passed [HttpClient] always send Content-Length when a body is passed [HttpClient] fix sending Content-Length/Type for POST Fix merge [HttpClient] fix sending PUT requests with curl Fix locales format in CrowdinProvider ...
2 parents d6aa708 + ad6a2be commit 16c12d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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;
@@ -247,7 +247,7 @@ private function handleAuthenticationFailure(AuthenticationException $authentica
247247

248248
// Avoid leaking error details in case of invalid user (e.g. user not found or invalid account status)
249249
// to prevent user enumeration via response content comparison
250-
if ($this->hideUserNotFoundExceptions && ($authenticationException instanceof UsernameNotFoundException || ($authenticationException instanceof AccountStatusException && !$authenticationException instanceof CustomUserMessageAccountStatusException))) {
250+
if ($this->hideUserNotFoundExceptions && ($authenticationException instanceof UserNotFoundException || ($authenticationException instanceof AccountStatusException && !$authenticationException instanceof CustomUserMessageAccountStatusException))) {
251251
$authenticationException = new BadCredentialsException('Bad credentials.', 0, $authenticationException);
252252
}
253253

Authenticator/RememberMeAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2121
use Symfony\Component\Security\Core\Exception\CookieTheftException;
2222
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
23-
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
23+
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
2424
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
2525
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
2626
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
@@ -106,7 +106,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
106106
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
107107
{
108108
if (null !== $this->logger) {
109-
if ($exception instanceof UsernameNotFoundException) {
109+
if ($exception instanceof UserNotFoundException) {
110110
$this->logger->info('User for remember-me cookie not found.', ['exception' => $exception]);
111111
} elseif ($exception instanceof UnsupportedUserException) {
112112
$this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $exception]);

0 commit comments

Comments
 (0)