Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94f4763

Browse files
committed
Fixed fetching sessionId from InputBag
1 parent 2460ca5 commit 94f4763

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ public function authenticate(RequestEvent $event)
9797
if (null !== $session) {
9898
$usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : 0;
9999
$usageIndexReference = PHP_INT_MIN;
100-
$sessionId = $request->cookies->get($session->getName());
100+
$sessionId = $request->cookies->all()[$session->getName()] ?? null;
101101
$token = $session->get($this->sessionKey);
102102

103+
// sessionId = true is used in the tests
103104
if ($this->sessionTrackerEnabler && \in_array($sessionId, [true, $session->getId()], true)) {
104105
$usageIndexReference = $usageIndexValue;
105106
} else {

0 commit comments

Comments
 (0)