summaryrefslogtreecommitdiff
path: root/src/bg
diff options
context:
space:
mode:
authorhackademix2018-08-24 22:16:10 +0200
committerhackademix2018-08-24 22:28:05 +0200
commit7913e29a92c6810aa35975818e25d447fb179a0b (patch)
tree6914fbe311698af8c8e37a6ef02859f429a4b5df /src/bg
parentfc92be83c323cf07f2b0f116b9c6436d0b21ea54 (diff)
downloadnoscript-7913e29a92c6810aa35975818e25d447fb179a0b.tar.gz
noscript-7913e29a92c6810aa35975818e25d447fb179a0b.tar.xz
noscript-7913e29a92c6810aa35975818e25d447fb179a0b.zip
Fixed infinite reload loop on unrestricted tabs.
Diffstat (limited to 'src/bg')
-rw-r--r--src/bg/RequestGuard.js4
1 files changed, 2 insertions, 2 deletions
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",