Issue Bug Closed

#100621CSP: Reduce a directive by a URL in csp.yaml is not working

Chris Müller 04/16/23, 16:18 updated 07/09/24, 12:55

Description

Given the following snippet in a csp.yaml:

inheritDefault: true
mutations:
  - mode: reduce
    directive: 'frame-src'
    sources:
      - "*.vimeo.com"

This should remove the default source “*.vimeo.com”, but it does not.

The problem seems to lie in the SourceCollection->without() method: Here two UriValue objects are compared via in_array which returns false (and negate to true). So the source is kept.

Reviews 1