Skip to content

Commit

Permalink
Issue #3228260 by cameronprince, gapple: Fix call to Crypt::randomByt…
Browse files Browse the repository at this point in the history
…es() which was removed from D9
  • Loading branch information
gapple committed Aug 17, 2021
1 parent 5a9aa06 commit 18771bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EventSubscriber/CspSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function getNonce() {
if (!$this->nonce) {
// Nonce should be at least 128 bits.
// @see https://www.w3.org/TR/CSP/#security-nonces
$this->nonce = rtrim(base64_encode(Crypt::randomBytes(16)), '=');
$this->nonce = Crypt::randomBytesBase64(16);
}

return $this->nonce;
Expand Down

0 comments on commit 18771bc

Please sign in to comment.