Skip to content

Commit

Permalink
Merge pull request #187 from akrabat/increase-uniqid-entropy
Browse files Browse the repository at this point in the history
Increase uniqid entropy
  • Loading branch information
akrabat authored Jun 9, 2024
2 parents 56a0cfb + 163f301 commit 1859330
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ See https://github.com/slimphp/Slim-Csrf/releases for a full list
underscore. This should not affect anyone who uses the relvant methods, but
if you have hard-coded, then they will need to be updated.

- Changed: Increased likelihood that tokens are unique.

## 1.5.0

- Added: Support for PHP 8.2 and 8.3
Expand Down
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 1859330

Please sign in to comment.