From d88a0cf6d76408be4455d8e6a1ba5cb55bd6b8b7 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 25 Jul 2018 11:08:43 +0200 Subject: Fixed infinite reload loops on scripting permissions mismatches. --- src/bg/RequestGuard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bg/RequestGuard.js') 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}; } -- cgit v1.2.3