Ignore search / hash on policy matching of domain-less URLs (e.g. file:///...).

This commit is contained in:
hackademix 2020-08-15 18:02:04 +02:00
parent 3f8d2a0bad
commit 2850f631b9
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ var {Permissions, Policy, Sites} = (() => {
let path = url.pathname;
siteKey = url.origin;
if (siteKey === "null") {
siteKey = site;
([siteKey] = site.split(/[?#]/)); // drop any search / hash segment
} else if (path !== '/') {
siteKey += path;
}