From 7913e29a92c6810aa35975818e25d447fb179a0b Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 24 Aug 2018 22:16:10 +0200 Subject: Fixed infinite reload loop on unrestricted tabs. --- src/bg/RequestGuard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bg/RequestGuard.js') diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 9f28116..68b74b9 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -462,7 +462,7 @@ var RequestGuard = (() => { } if (header) { - pending.cspHeader = header; + if (blocker) pending.cspHeader = header; if (!hasReportTo) { responseHeaders.push(REPORT_TO); } @@ -489,7 +489,7 @@ var RequestGuard = (() => { if (pending) { pending.scriptBlocked = scriptBlocked; if (!(pending.headersProcessed && - (scriptBlocked || ns.policy.can(url, "script", request.documentURL)) + (scriptBlocked || !ns.isEnforced(tabId) || ns.policy.can(url, "script", request.documentURL)) )) { debug("[WARNING] onHeadersReceived %s %o", frameId, tabId, pending.headersProcessed ? "has been overridden on": "could not process", -- cgit v1.2.3