Reset non-secure site matches to DEFAULT unless setting UNTRUSTED to avoid confusion on preset changes.

This commit is contained in:
hackademix 2020-05-31 12:28:51 +02:00
parent ab6b390569
commit e424fe9aa8
1 changed files with 6 additions and 1 deletions

View File

@ -428,10 +428,15 @@ var {Permissions, Policy, Sites} = (() => {
let {url, siteKey} = Sites.parse(site);
sites.delete(siteKey);
let wideSiteKey = Sites.toggleSecureDomainKey(siteKey, false);
if (perms === this.UNTRUSTED) {
cascade = true;
siteKey = Sites.toggleSecureDomainKey(siteKey, false);
siteKey = wideSiteKey;
} else {
if (wideSiteKey !== siteKey) {
sites.delete(wideSiteKey);
}
}
if (cascade && !url) {
for (let subMatch; (subMatch = sites.match(siteKey));) {