Skip to content

Commit

Permalink
use $sessionId instead of $sessionCookiePath on SessionUtils::popSess…
Browse files Browse the repository at this point in the history
…ionCookie call
  • Loading branch information
simonchrz authored and derrabus committed Dec 6, 2021
1 parent 5de4832 commit 56df45c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion EventListener/AbstractSessionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function onKernelResponse(ResponseEvent $event)
$sessionCookieHttpOnly = $this->sessionOptions['cookie_httponly'] ?? true;
$sessionCookieSameSite = $this->sessionOptions['cookie_samesite'] ?? Cookie::SAMESITE_LAX;

SessionUtils::popSessionCookie($sessionName, $sessionCookiePath);
SessionUtils::popSessionCookie($sessionName, $sessionId);

$request = $event->getRequest();
$requestSessionCookieId = $request->cookies->get($sessionName);
Expand Down
1 change: 1 addition & 0 deletions Tests/EventListener/SessionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ public function testSessionUsageLogIfStatelessAndSessionUsed()
public function testSessionIsSavedWhenUnexpectedSessionExceptionThrown()
{
$session = $this->createMock(Session::class);
$session->expects($this->exactly(1))->method('getId')->willReturn('123456');
$session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
$session->method('isStarted')->willReturn(true);
$session->expects($this->exactly(2))->method('getUsageIndex')->will($this->onConsecutiveCalls(0, 1));
Expand Down

0 comments on commit 56df45c

Please sign in to comment.