mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
catch bad regex parse
This commit is contained in:
parent
01a64676b4
commit
23b3972503
1 changed files with 8 additions and 4 deletions
|
@ -383,12 +383,16 @@ namespace Bit.Core.Services
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UriMatchType.RegularExpression:
|
case UriMatchType.RegularExpression:
|
||||||
var regex = new Regex(u.Uri, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(1));
|
try
|
||||||
match = regex.IsMatch(url);
|
|
||||||
if(match)
|
|
||||||
{
|
{
|
||||||
AddMatchingLogin(cipher, matchingLogins, matchingFuzzyLogins);
|
var regex = new Regex(u.Uri, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(1));
|
||||||
|
match = regex.IsMatch(url);
|
||||||
|
if(match)
|
||||||
|
{
|
||||||
|
AddMatchingLogin(cipher, matchingLogins, matchingFuzzyLogins);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch(ArgumentException) { }
|
||||||
break;
|
break;
|
||||||
case UriMatchType.Never:
|
case UriMatchType.Never:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue