8000 bug #24536 [Security] Reject remember-me token if UserCheckerInterfac… · symfony/symfony@4ebd60f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ebd60f

Browse files
committed
bug #24536 [Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails (kbond)
This PR was merged into the 2.7 branch. Discussion ---------- [Security] Reject remember-me token if UserCheckerInterface::checkPostAuth() fails | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24525 | License | MIT | Doc PR | - I think this is a security hole - a user can remain logged in with a remember me cookie even though they can no longer pass `UserCheckInterface::checkPostAuth()` (could be disabled). This is a small BC break but shouldn't be an issue as I think it is a bug. I don't think this requires a BC layer but if so, I can add. Commits ------- fe190b6 reject remember-me token if user check fails
2 parents 2059609 + fe190b6 commit 4ebd60f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function authenticate(TokenInterface $token)
4949

5050
$user = $token->getUser();
5151
$this->userChecker->checkPreAuth($user);
52+
$this->userChecker->checkPostAuth($user);
5253

5354
$authenticatedToken = new RememberMeToken($user, $this->providerKey, $this->key);
5455
$authenticatedToken->setAttributes($token->getAttributes());

0 commit comments

Comments
 (0)
0