Prevent malformed URLs from loading current tab

This commit is contained in:
Matt Smith 2020-07-09 15:56:09 -05:00
parent d308245237
commit 0d3b32a10d
1 changed files with 5 additions and 2 deletions

View File

@ -333,9 +333,12 @@ export class CipherService implements CipherServiceAbstraction {
this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => { this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => {
let matches: any[] = []; let matches: any[] = [];
eqDomains.forEach((eqDomain) => { eqDomains.forEach((eqDomain) => {
try {
if (eqDomain.length && eqDomain.indexOf(domain) >= 0) { if (eqDomain.length && eqDomain.indexOf(domain) >= 0) {
matches = matches.concat(eqDomain); matches = matches.concat(eqDomain);
} }
}
catch {}
}); });
if (!matches.length) { if (!matches.length) {