mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
catch invalid regex
This commit is contained in:
parent
2c43a5f06a
commit
e0190f14be
@ -238,10 +238,12 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UriMatchType.RegularExpression:
|
case UriMatchType.RegularExpression:
|
||||||
|
try {
|
||||||
const regex = new RegExp(u.uri, 'i');
|
const regex = new RegExp(u.uri, 'i');
|
||||||
if (regex.test(url)) {
|
if (regex.test(url)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} catch { }
|
||||||
break;
|
break;
|
||||||
case UriMatchType.Never:
|
case UriMatchType.Never:
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user