Skip to content

Implement base-uri CSP check #42261

@TimvdLippe

Description

@TimvdLippe

Calling point:

// running Is base allowed for Document? on urlRecord and document returns "Blocked",

Our CSP trait that needs a new method to delegate:
pub(crate) trait CspReporting {

Relevant spec: https://www.w3.org/TR/CSP3/#directive-base-uri

Since the CSP code lives in a separate crate (https://github.com/rust-ammonia/rust-content-security-policy) which has the relevant implementation: https://github.com/rust-ammonia/rust-content-security-policy/blob/90a0221fa0b1834c7072da4f690326c420e9b397/src/lib.rs#L341 we need to delegate to it like we do with the other trait implementations

Testing: ./mach test-wpt /content-security-policy/base-uri

Metadata

Metadata

Labels

A-content/scriptRelated to the script threadA-securityC-assignedThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions