diff options
author | hackademix | 2018-09-04 18:48:14 +0200 |
---|---|---|
committer | hackademix | 2018-09-04 19:28:16 +0200 |
commit | 26470b84f681b7db9e500bb4503eab7b8b202879 (patch) | |
tree | 842228c86ab61eb149868752479b53f19b05d9c9 /src/lib/restricted.js | |
parent | df149a5a5578f3d34ba404836fccca8d2cfa508e (diff) | |
download | noscript-26470b84f681b7db9e500bb4503eab7b8b202879.tar.gz noscript-26470b84f681b7db9e500bb4503eab7b8b202879.tar.xz noscript-26470b84f681b7db9e500bb4503eab7b8b202879.zip |
Transparent support for FQDNs and better management of file:/// URLs.
Diffstat (limited to 'src/lib/restricted.js')
-rw-r--r-- | src/lib/restricted.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/restricted.js b/src/lib/restricted.js index ae85ba8..6415221 100644 --- a/src/lib/restricted.js +++ b/src/lib/restricted.js @@ -21,7 +21,7 @@ function isRestrictedURL(u) { try { if (typeof u === "string") u = new URL(u); - return u.protocol === "https:" && domains.includes(u.hostname); + return u.protocol === "https:" && domains.includes(tld.normalize(u.hostname || "")); } catch (e) { return false; } |