Skip to content

Commit

Permalink
Increase uniqid entropy
Browse files Browse the repository at this point in the history
While we don't have that many tokens in play at any one time, this will
increase the likelihood that the tokens are unique.
  • Loading branch information
akrabat committed Jun 8, 2024
1 parent 56a0cfb commit cb387b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ protected function createToken(): string
public function generateToken(): array
{
// Generate new CSRF token
$name = uniqid($this->prefix);
$name = uniqid($this->prefix, true);
$value = $this->createToken();
$this->saveTokenToStorage($name, $value);

Expand Down

0 comments on commit cb387b2

Please sign in to comment.