[TabGuard] Fix destination domain being reported as the trigger of a warning prompt when all the other tab-tied domains have been exempted (thanks barbaz for report).

This commit is contained in:
hackademix 2023-06-28 16:31:18 +02:00
parent 448e959a71
commit 3cd1a6049d
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,9 @@ var TabGuard = (() => {
suspiciousDomains.push(getDomain(tab.url)); suspiciousDomains.push(getDomain(tab.url));
})); }));
let legitDomains = allowedGroups[tabDomain] || new Set([tabDomain]); const legitDomains = allowedGroups[tabDomain] || new Set();
legitDomains.add(tabDomain);
let otherDomains = new Set(suspiciousDomains.filter(d => d && !legitDomains.has(d))); let otherDomains = new Set(suspiciousDomains.filter(d => d && !legitDomains.has(d)));
if (otherDomains.size === 0) return; // no cross-site ties, no party if (otherDomains.size === 0) return; // no cross-site ties, no party