mirror of
https://github.com/bitwarden/mobile
synced 2026-01-04 17:43:17 +00:00
parse IP addresses as base domains
This commit is contained in:
@@ -30,20 +30,15 @@ namespace Bit.App.Pages
|
||||
Uri = uriString;
|
||||
|
||||
Uri uri;
|
||||
DomainName domainName;
|
||||
if(uriString?.StartsWith(Constants.AndroidAppProtocol) ?? false)
|
||||
{
|
||||
_name = uriString.Substring(Constants.AndroidAppProtocol.Length);
|
||||
}
|
||||
else if(!System.Uri.TryCreate(uriString, UriKind.Absolute, out uri) ||
|
||||
!DomainName.TryParse(uri.Host, out domainName))
|
||||
!DomainName.TryParseBaseDomain(uri.Host, out _name))
|
||||
{
|
||||
_name = "--";
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = domainName.BaseDomain;
|
||||
}
|
||||
|
||||
_loginService = Resolver.Resolve<ILoginService>();
|
||||
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
|
||||
|
||||
Reference in New Issue
Block a user