Skip to content

Commit 40836bd

Browse files
committed
Applying suggested fix.
1 parent 6808429 commit 40836bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/HTTP/ContentSecurityPolicy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ public function finalize(ResponseInterface $response)
429429
{
430430
if ($this->autoNonce) {
431431
$this->generateNonces($response);
432-
} else {
433-
// If we're not auto-generating nonces, we should remove any nonce placeholders from the body to prevent them from being rendered.
432+
} elseif (! $this->enabled()) {
433+
// If autoNonce is disabled and CSP is not enabled, we should still remove any nonce tags from the body to prevent confusion.
434434
$body = (string) $response->getBody();
435435

436436
if ($body !== '') {

0 commit comments

Comments
 (0)