Skip to content

Commit 95e9e9c

Browse files
Merge branch '5.4' into 6.0
* 5.4: [Serializer] Fix denormalizing union types bug #42637 [Security] Fixed TOCTOU in RememberMe cache token verifier Add missing upgrade note for ldap [Mailer] Preserve case of headers
2 parents 8539cd5 + 8d622c2 commit 95e9e9c

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)