Fixed regression: undefined fake request.url ends to for inline scripts CSP reports.

This commit is contained in:
hackademix 2018-09-08 14:36:47 +02:00
parent 28c9a50b17
commit 746655c885
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ var RequestGuard = (() => {
let blockedURI = report['blocked-uri'];
if (blockedURI && blockedURI !== 'self') {
let r = fakeRequestFromCSP(report, request);
if (r.url === 'inline') r.url = request.documentURI;
if (r.url === 'inline') r.url = request.documentUrl;
Content.reportTo(r, false, policyTypesMap[r.type]);
TabStatus.record(r, "blocked");
} else if (report["violated-directive"] === "script-src" && /; script-src 'none'/.test(report["original-policy"])) {