Skip to content

Commit 2850f63

Browse files
committed
Ignore search / hash on policy matching of domain-less URLs (e.g. file:///...).
1 parent 3f8d2a0 commit 2850f63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/common/Policy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var {Permissions, Policy, Sites} = (() => {
7171
let path = url.pathname;
7272
siteKey = url.origin;
7373
if (siteKey === "null") {
74-
siteKey = site;
74+
([siteKey] = site.split(/[?#]/)); // drop any search / hash segment
7575
} else if (path !== '/') {
7676
siteKey += path;
7777
}

0 commit comments

Comments
 (0)