Skip to content
Snippets Groups Projects
Commit 18771bcd authored by Geoff Appleby's avatar Geoff Appleby
Browse files

Issue #3228260 by cameronprince, gapple: Fix call to Crypt::randomBytes() which was removed from D9

parent 5a9aa06f
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ class CspSubscriber implements EventSubscriberInterface {
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment