Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

SM Lacks Content Security Policy #1

@scriptsrc

Description

@scriptsrc

After setting the CSP headers and replacing main.dart.js with main.dart.precompiled.js, the application breaks:

"Deprecation: Automatic generation of output for Content Security Policy is deprecated and will be removed with the next development
release. Use the --csp option to generate CSP restricted output. "

and then failed with this:

main.dart.precompiled.js::83551
append$1: [function(receiver, newChild) {
      return receiver.appendChild(newChild);
      ^^ Refused to execute inline script because it violates the following Content Security         Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

The javascript builder doesn't yet accept a --csp flag. Florian asked that I open an issue in the Dart project to track the problem. I'll link to the dart issue once I have created it. Could also be an issue in the Security Monkey searchpage view, as that file does contain a script element:

<script src="js/searchpage.js">
</script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions