summaryrefslogtreecommitdiff
path: root/src/bg/RequestGuard.js
diff options
context:
space:
mode:
authorhackademix2018-07-25 11:08:43 +0200
committerhackademix2018-07-25 11:08:43 +0200
commitd88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7 (patch)
tree1f6c82409b6fd43cd92ddcdffda2fea6125bbb47 /src/bg/RequestGuard.js
parent391c8b402a2a1a103db8f232ecde65410f82c9ef (diff)
downloadnoscript-d88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7.tar.gz
noscript-d88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7.tar.xz
noscript-d88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7.zip
Fixed infinite reload loops on scripting permissions mismatches.
Diffstat (limited to 'src/bg/RequestGuard.js')
-rw-r--r--src/bg/RequestGuard.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js
index 8191f3e..688bcc0 100644
--- a/src/bg/RequestGuard.js
+++ b/src/bg/RequestGuard.js
@@ -269,7 +269,7 @@ var RequestGuard = (() => {
let records = TabStatus.map.get(tabId);
let noscriptFrames = records && records.noscriptFrames;
let canScript = !(noscriptFrames && noscriptFrames[sender.frameId]);
- let shouldScript = ns.isEnforced(tabId) && ns.policy.can(url, "script");
+ let shouldScript = !ns.isEnforced(tabId) || ns.policy.can(url, "script");
debug("Frame %s %s of %o, canScript: %s, shouldScript: %s", frameId, url, noscriptFrames, canScript, shouldScript);
return {canScript, shouldScript};
}