summaryrefslogtreecommitdiff
path: root/src/common/Policy.js
diff options
context:
space:
mode:
authorhackademix2018-09-09 15:00:08 +0200
committerhackademix2018-09-09 15:00:08 +0200
commit9b3b5e050376f2d9d4c8dd17eddce4df417f9ebc (patch)
treeb38c263170825d3639f291a4163308aab871e613 /src/common/Policy.js
parent1cfb3117efbe2f41494155719fec0ce16960790c (diff)
downloadnoscript-9b3b5e050376f2d9d4c8dd17eddce4df417f9ebc.tar.gz
noscript-9b3b5e050376f2d9d4c8dd17eddce4df417f9ebc.tar.xz
noscript-9b3b5e050376f2d9d4c8dd17eddce4df417f9ebc.zip
Prevent total breakages when policies accidentally map to invalid match patterns.
Diffstat (limited to 'src/common/Policy.js')
-rw-r--r--src/common/Policy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Policy.js b/src/common/Policy.js
index ca3c04c..37bd164 100644
--- a/src/common/Policy.js
+++ b/src/common/Policy.js
@@ -116,7 +116,7 @@ var {Permissions, Policy, Sites} = (() => {
}
set(k, v) {
- if (!k || SKIP_RX.test(k)) return this;
+ if (!k || SKIP_RX.test(k) || k === "ยง:") return this;
let [,domain] = DOMAIN_RX.exec(k);
if (/[^\u0000-\u007f]/.test(domain)) {
k = k.replace(domain, punycode.toASCII(domain));