From 0d3b32a10d27fe642cdc90b5059fa6218e30989d Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Thu, 9 Jul 2020 15:56:09 -0500 Subject: [PATCH] Prevent malformed URLs from loading current tab --- src/services/cipher.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/cipher.service.ts b/src/services/cipher.service.ts index 7b519a1a4f..93d5a1fbcd 100644 --- a/src/services/cipher.service.ts +++ b/src/services/cipher.service.ts @@ -333,9 +333,12 @@ export class CipherService implements CipherServiceAbstraction { this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => { let matches: any[] = []; eqDomains.forEach((eqDomain) => { - if (eqDomain.length && eqDomain.indexOf(domain) >= 0) { - matches = matches.concat(eqDomain); + try { + if (eqDomain.length && eqDomain.indexOf(domain) >= 0) { + matches = matches.concat(eqDomain); + } } + catch {} }); if (!matches.length) {