8000 [Security] Delete old session on auth strategy migrate · symfony/symfony@5dd11e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5dd11e6

Browse files
committed
[Security] Delete old session on auth strategy migrate
1 parent f79aa94 commit 5dd11e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Security/Http/Session/SessionAuthenticationStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function onAuthentication(Request $request, TokenInterface $token)
4747
return;
4848

4949
case self::MIGRATE:
50-
$request->getSession()->migrate();
50+
$request->getSession()->migrate(true);
5151

5252
return;
5353

src/Symfony/Component/Security/Tests/Http/Session/SessionAuthenticationStrategyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testUnsupportedStrategy()
4747
public function testSessionIsMigrated()
4848
{
4949
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
50-
$session->expects($this->once())->method('migrate');
50+
$session->expects($this->once())->method('migrate')->with($this->equalTo(true));
5151

5252
$strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE);
5353
$strategy->onAuthentication($this->getRequest($session), $this->getToken());

0 commit comments

Comments
 (0)
0