8000 use $sessionId instead of $sessionCookiePath on SessionUtils::popSess… · symfony/symfony@36b466e · GitHub
[go: up one dir, main page]

Skip to content

Commit 36b466e

Browse files
simonchrzderrabus
authored andcommitted
use $sessionId instead of $sessionCookiePath on SessionUtils::popSessionCookie call
1 parent dcf09d6 commit 36b466e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function onKernelResponse(ResponseEvent $event)
146146
$sessionCookieHttpOnly = $this->sessionOptions['cookie_httponly'] ?? true;
147147
$sessionCookieSameSite = $this->sessionOptions['cookie_samesite'] ?? Cookie::SAMESITE_LAX;
148148

149-
SessionUtils::popSessionCookie($sessionName, $sessionCookiePath);
149+
SessionUtils::popSessionCookie($sessionName, $sessionId);
150150

151151
$request = $event->getRequest();
152152
$requestSessionCookieId = $request->cookies->get($sessionName);

src/Symfony/Component/HttpKernel/Tests/EventListener/SessionListenerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ public function testSessionUsageLogIfStatelessAndSessionUsed()
312312
public function testSessionIsSavedWhenUnexpectedSessionExceptionThrown()
313313
{
314314
$session = $this->createMock(Session::class);
315+
$session->expects($this->exactly(1))->method('getId')->willReturn('123456');
315316
$session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
316317
$session->method('isStarted')->willReturn(true);
317318
$session->expects($this->exactly(2))->method('getUsageIndex')->will($this->onConsecutiveCalls(0, 1));

0 commit comments

Comments
 (0)
0