summaryrefslogtreecommitdiff
path: root/src/bg
diff options
context:
space:
mode:
authorhackademix2018-08-21 23:51:59 +0200
committerhackademix2018-08-21 23:51:59 +0200
commit91334fe94477fdbcb85fcf93d87e3c73294da106 (patch)
tree34224a6b802e7aeceb420112ac257535800bdcbd /src/bg
parente742e5d80102c01174d5d26d7b7c209fbd02cc9a (diff)
downloadnoscript-91334fe94477fdbcb85fcf93d87e3c73294da106.tar.gz
noscript-91334fe94477fdbcb85fcf93d87e3c73294da106.tar.xz
noscript-91334fe94477fdbcb85fcf93d87e3c73294da106.zip
Fixed inconstitencies in ChildPolicies content script URL matching.
Diffstat (limited to 'src/bg')
-rw-r--r--src/bg/ChildPolicies.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bg/ChildPolicies.js b/src/bg/ChildPolicies.js
index 5b1b209..32abafe 100644
--- a/src/bg/ChildPolicies.js
+++ b/src/bg/ChildPolicies.js
@@ -111,11 +111,12 @@
// compute exclusions
let permsMapEntries = [...permsMap];
let excludeMap = new Map();
+
for (let [perms, keys] of permsMapEntries) {
excludeMap.set(perms, siteKeys2MatchPatterns(flatten(
permsMapEntries.filter(([other]) => other !== perms)
.map(([otherPerms, otherKeys]) => otherKeys))
- .filter(k => k && k.includes("/"))
+ .filter(k => k && k.includes("/") && keys.some(by => Sites.isImplied(k, by)))
));
}