mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-27 12:26:31 +01:00
fix ip address matching on getdomain
This commit is contained in:
parent
46e631388d
commit
ac6f3a6bb6
@ -63,8 +63,11 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
name = Uri.Substring(Constants.AndroidAppProtocol.Length);
|
name = Uri.Substring(Constants.AndroidAppProtocol.Length);
|
||||||
}
|
}
|
||||||
else if(!System.Uri.TryCreate(Uri, UriKind.Absolute, out Uri uri) ||
|
else
|
||||||
!DomainName.TryParseBaseDomain(uri.Host, out name))
|
{
|
||||||
|
name = CoreHelpers.GetDomain(Uri);
|
||||||
|
}
|
||||||
|
if(string.IsNullOrWhiteSpace(name))
|
||||||
{
|
{
|
||||||
name = "--";
|
name = "--";
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ namespace Bit.Core.Utilities
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(uri.Host == "localhost" || Regex.IsMatch(uriString, IpRegex))
|
if(uri.Host == "localhost" || Regex.IsMatch(uri.Host, IpRegex))
|
||||||
{
|
{
|
||||||
return uri.Host;
|
return uri.Host;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user