Issue Bug New Orphaned

#103640CSP: default-src: 'none' is inherited to other directives

Chris Müller 04/16/24, 16:44 updated 01/23/26, 11:21

Description

Using this configuration:

inheritDefault: false

mutations:
  - mode: set
    directive: 'default-src'
    sources:
      - "'none'"

  - mode: extend
    directive: "child-src"
    sources:
      - "'self'"

results in this output:

default-src 'none'; child-src 'none' 'self'

The ‘none’ in “child-src” is obviously wrong.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] CSP: default-src: 'none' is inherited to other directives Resolves: #103640 Releases: main