Skip to content

Commit ab816cc

Browse files
Fix the previously broken test
This commit adds a fix to the test that was introduced before and that broke the build. When a custom TokenVerifier is used, the provided token might not be the same as the expected token. But the provided token will later be added to the Cookie which results in a broken cookie. By replacing the provided token with the actually expected one from the persistence layer this is fixed. This will still not solve concurrency issues where two parallel requests with any token will currently result in two different tokens being created for the same family but that is something else that needs to be discussed first.
1 parent b12e8de commit ab816cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Security/Http/RememberMe/PersistentRememberMeHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function processRememberMe(RememberMeDetails $rememberMeDetails, UserInte
7575

7676
if ($this->tokenVerifier) {
7777
$isTokenValid = $this->tokenVerifier->verifyToken($persistentToken, $tokenValue);
78+
$tokenValue = $persistentToken->getTokenValue();
7879
} else {
7980
$isTokenValid = hash_equals($persistentToken->getTokenValue(), $tokenValue);
8081
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy