diff options
author | hackademix | 2018-07-28 02:19:48 +0200 |
---|---|---|
committer | hackademix | 2018-07-28 02:19:48 +0200 |
commit | d45209060fe4c03c37a3d0e3211e4d30a4beae14 (patch) | |
tree | 90ca928d346190c621fbab22867dcebaeb03eb7b /src/bg/RequestGuard.js | |
parent | 10d0809b74eeb59452073644ac1c97db27fc0036 (diff) | |
download | noscript-d45209060fe4c03c37a3d0e3211e4d30a4beae14.tar.gz noscript-d45209060fe4c03c37a3d0e3211e4d30a4beae14.tar.xz noscript-d45209060fe4c03c37a3d0e3211e4d30a4beae14.zip |
Fixed window.stop() called in empty suframes.
Diffstat (limited to 'src/bg/RequestGuard.js')
-rw-r--r-- | src/bg/RequestGuard.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index d13bf4b..e17d997 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -266,12 +266,13 @@ var RequestGuard = (() => { return true; } case "canScript": { - let {frameId, url, tab} = sender; + let {frameId, tab} = sender; + let {url} = message; let tabId = tab.id; 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) || !url.startsWith("http") || ns.policy.can(url, "script"); debug("Frame %s %s of %o, canScript: %s, shouldScript: %s", frameId, url, noscriptFrames, canScript, shouldScript); return {canScript, shouldScript}; } |