Skip to content

Commit

Permalink
[Security] Prefer clone over unserialize(serialize()) for user refres…
Browse files Browse the repository at this point in the history
…hment
  • Loading branch information
Robin Chalas committed Dec 15, 2018
1 parent d1bf595 commit a8eba80
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -170,7 +170,7 @@ protected function refreshUser(TokenInterface $token)

try {
$refreshedUser = $provider->refreshUser($user);
$newToken = unserialize(serialize($token));
$newToken = clone $token;
$newToken->setUser($refreshedUser);

// tokens can be deauthenticated if the user has been changed.
Expand Down

0 comments on commit a8eba80

Please sign in to comment.