mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
catch invalid regex
This commit is contained in:
@@ -238,10 +238,12 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
}
|
||||
break;
|
||||
case UriMatchType.RegularExpression:
|
||||
try {
|
||||
const regex = new RegExp(u.uri, 'i');
|
||||
if (regex.test(url)) {
|
||||
return true;
|
||||
}
|
||||
} catch { }
|
||||
break;
|
||||
case UriMatchType.Never:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user