Skip to content

Commit

Permalink
[Security] Delete old session on auth strategy migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaris committed Dec 20, 2014
1 parent f79aa94 commit 5dd11e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -47,7 +47,7 @@ public function onAuthentication(Request $request, TokenInterface $token)
return;

case self::MIGRATE:
$request->getSession()->migrate();
$request->getSession()->migrate(true);

return;

Expand Down
Expand Up @@ -47,7 +47,7 @@ public function testUnsupportedStrategy()
public function testSessionIsMigrated()
{
$session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
$session->expects($this->once())->method('migrate');
$session->expects($this->once())->method('migrate')->with($this->equalTo(true));

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

0 comments on commit 5dd11e6

Please sign in to comment.