Skip to content

Commit 43a29f7

Browse files
Merge branch '6.0' into 6.1
* 6.0: [Serializer] Fix denormalizing union types [HttpFoundation] Remove obsolete override bug #42637 [Security] Fixed TOCTOU in RememberMe cache token verifier Fix compatibility of ldap 6.0 with security 5.x Add missing upgrade note for ldap [Mailer] Preserve case of headers
2 parents f7c62d7 + 95e9e9c commit 43a29f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Authentication/RememberMe/CacheTokenVerifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public function verifyToken(PersistentTokenInterface $token, string $tokenValue)
4545
}
4646

4747
$cacheKey = $this->getCacheKey($token);
48-
if (!$this->cache->hasItem($cacheKey)) {
48+
$item = $this->cache->getItem($cacheKey);
49+
if (!$item->isHit()) {
4950
return false;
5051
}
5152

52-
$item = $this->cache->getItem($cacheKey);
5353
$outdatedToken = $item->get();
5454

5555
return hash_equals($outdatedToken, $tokenValue);

0 commit comments

Comments
 (0)