Skip to content

Commit

Permalink
regenerate the token on session regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 6, 2018
1 parent ed0a327 commit 20e8419
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Session/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,9 @@ public function invalidate()
*/
public function regenerate($destroy = false)
{
return $this->migrate($destroy);
return tap($this->migrate($destroy), function () {
$this->regenerateToken();
});
}

/**
Expand Down

0 comments on commit 20e8419

Please sign in to comment.