Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

add content-type application/csp-report #1242

Merged
merged 1 commit into from
Nov 20, 2018
Merged

add content-type application/csp-report #1242

merged 1 commit into from
Nov 20, 2018

Conversation

theMiddleBlue
Copy link
Contributor

When Content-Security-Policy and Content-Security-Policy-Report-Only headers are configured with a self-referenced report URI (ex. report-uri /csp-report.php) the browser sends a POST request with Content-Type: application/csp-report that is blocked by CRS rule 920420: Request content type is not allowed by policy.

I've added the application/csp-report in:
crs-setup.conf.example on rule 900200
rules/REQUEST-901-INITIALIZATION.conf on rule 901162

I'm writing a set of rules in order to parse the report-uri request and create a ModSecurity log when a CSP violation occurs. Let me know if this could be useful or not.

@csanders-git
Copy link
Contributor

Yikes interesting oversite.

@csanders-git csanders-git merged commit ee7679e into SpiderLabs:v3.2/dev Nov 20, 2018
@dune73
Copy link
Contributor

dune73 commented Nov 20, 2018

Good one. Thanks @theMiddleBlue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants