diff --git a/src/common/Policy.js b/src/common/Policy.js index 59c24a4..ffa1d2e 100644 --- a/src/common/Policy.js +++ b/src/common/Policy.js @@ -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));) {