Skip to content

Commit b073c43

Browse files
committed
Revert "minor symfony#46624 [Security] Workaround segfault (chalasr)"
This reverts commit 9edba5d, reversing changes made to e74bd5b.
1 parent d0bfcce commit b073c43

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2222
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
2323
use Symfony\Component\Security\Core\Exception\AuthenticationException;
24+
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
2425
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
2526
use Symfony\Component\Security\Core\User\UserProviderInterface;
2627
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
@@ -84,10 +85,8 @@ public function authenticate(Request $request): Passport
8485
throw $e;
8586
}
8687

87-
$userBadge = new UserBadge($credentials['username'], $this->userProvider->loadUserByIdentifier(...));
88-
8988
$passport = new Passport(
90-
$userBadge,
89+
new UserBadge($credentials['username'], $this->userProvider->loadUserByIdentifier(...)),
9190
new PasswordCredentials($credentials['password'])
9291
);
9392
if ($this->userProvider instanceof PasswordUpgraderInterface) {

0 commit comments

Comments
 (0)