Hi,
I've set up my CSP settings and add only script-src und style-src directives.
But if I load a node add form, the following header is responded:
Content-Security-Policy-Report-Only: script-src 'self' 'unsafe-inline' https://maps.googleapis.com https://cdnjs.cloudflare.com https://rebilly.github.io https://unpkg.com platform.instagram.com platform.twitter.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://unpkg.com; script-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com https://unpkg.com
You can see, that there is the script-src-elem directive added. But I have not configured.
My csp.settings are
report-only:
enable: true
directives:
script-src:
sources:
- 'https://maps.googleapis.com'
flags:
- unsafe-inline
base: self
style-src:
flags:
- unsafe-inline
base: self
reporting:
plugin: none
enforce:
enable: false
Comments
Comment #2
sunlixIf I add the script-src-elem directive to the config and add a custom host string also.
There is no change to the script-src-elem directive in the responded csp header.
I've re-testet that in a fresh installation after flushing all caches next to the config change.
Comment #4
gappleThanks for the bug report.
Looks like I made an error while implementing #3100068: Script/style included in AJAX responses blocked without 'unsafe-inline', causing
script-src-elemto be incorrectly set based onstyle-src.This will be fixed in 1.x-1.8, which will be available shortly.
Comment #5
gapple