Skip to content

Commit

Permalink
[Security] Unserialize $parentData, if needed, to be sure the parentD…
Browse files Browse the repository at this point in the history
…ata variable is an array

Check that the $parentData is an array, if it's a string, variable is unserialized.
Useful to not break the compatibility with older version.
  • Loading branch information
rfaivre committed May 18, 2020
1 parent 87c6683 commit 230a1f7
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -99,6 +99,7 @@ public function __serialize(): array
public function __unserialize(array $data): void
{
[$this->credentials, $this->providerKey, $parentData] = $data;
$parentData = \is_array($parentData) ? $parentData : unserialize($parentData);
parent::__unserialize($parentData);
}
}

0 comments on commit 230a1f7

Please sign in to comment.