Skip to content

merging unsafe-inline with nonces/hashes #220

@bakkot

Description

@bakkot

The unsafe-inline source expression has no effect when a nonce-source or hash-source is specified (edit: or strict-dynamic, in scripts). Also, nonce-source and hash-source are effectively stricter versions of unsafe-inline, not orthogonal to it. Merging needs to take this into account:

  • Unioning script-src 'unsafe-inline' with script-src nonce-asdf should produce script-src 'unsafe-inline', rather than script-src 'unsafe-inline' nonce-asdf (which is effectively script-src nonce-asdf).
  • Intersecting script-src 'unsafe-inline' with script-src nonce-asdf should produce script-src nonce-asdf rather than script-src.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions