Skip to content

Commit

Permalink
Merge branch '6.0' into 6.1
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
nicolas-grekas committed Mar 31, 2022
2 parents d6aa708 + ad6a2be commit 16c12d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Authentication/AuthenticatorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator;
Expand Down Expand Up @@ -247,7 +247,7 @@ private function handleAuthenticationFailure(AuthenticationException $authentica

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

Expand Down
4 changes: 2 additions & 2 deletions Authenticator/RememberMeAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\CookieTheftException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
Expand Down Expand Up @@ -106,7 +106,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
{
if (null !== $this->logger) {
if ($exception instanceof UsernameNotFoundException) {
if ($exception instanceof UserNotFoundException) {
$this->logger->info('User for remember-me cookie not found.', ['exception' => $exception]);
} elseif ($exception instanceof UnsupportedUserException) {
$this->logger->warning('User class for remember-me cookie not supported.', ['exception' => $exception]);
Expand Down

0 comments on commit 16c12d0

Please sign in to comment.