Skip to content

Commit

Permalink
Merge pull request #367 from localgovdrupal/1.x
Browse files Browse the repository at this point in the history
1.7.9 release
  • Loading branch information
finnlewis authored Aug 20, 2024
2 parents 4b9d451 + b701526 commit 537bf08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Entity/AlertBannerEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public function preSave(EntityStorageInterface $storage) {
// Regenerate a JS token for the updated alert banner.
if ($this->get('status')->value) {
$prefix = 'alert-' . $this->id() . '-';
// @phpstan-ignore-next-line Both sha1 and uniqid are safe to use in this context.
$hash = sha1(uniqid('', TRUE));
$this->setToken($prefix . '-' . $hash);
}
Expand Down

0 comments on commit 537bf08

Please sign in to comment.