mirror of
https://github.com/bitwarden/android.git
synced 2024-12-22 09:04:27 +03:00
android app match fixes
This commit is contained in:
parent
b5311e1448
commit
2d6895aeea
1 changed files with 6 additions and 13 deletions
|
@ -64,17 +64,10 @@ namespace Bit.App.Services
|
|||
|
||||
Uri uri = null;
|
||||
DomainName domainName = null;
|
||||
var androidApp = false;
|
||||
var androidApp = UriIsAndroidApp(uriString);
|
||||
|
||||
if(!Uri.TryCreate(uriString, UriKind.Absolute, out uri) || !DomainName.TryParse(uri.Host, out domainName))
|
||||
{
|
||||
if(domainName == null)
|
||||
{
|
||||
androidApp = UriIsAndroidApp(uriString);
|
||||
}
|
||||
}
|
||||
|
||||
if(!androidApp && domainName == null)
|
||||
if(!androidApp &&
|
||||
(!Uri.TryCreate(uriString, UriKind.Absolute, out uri) || !DomainName.TryParse(uri.Host, out domainName)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -91,8 +84,7 @@ namespace Bit.App.Services
|
|||
{
|
||||
matchingDomains.AddRange(eqDomain.Select(d => d).ToList());
|
||||
}
|
||||
|
||||
if(androidAppWebUriString != null && Array.IndexOf(eqDomain, androidAppWebUriString) >= 0)
|
||||
else if(androidAppWebUriString != null && Array.IndexOf(eqDomain, androidAppWebUriString) >= 0)
|
||||
{
|
||||
matchingFuzzyDomains.AddRange(eqDomain.Select(d => d).ToList());
|
||||
}
|
||||
|
@ -108,7 +100,8 @@ namespace Bit.App.Services
|
|||
matchingDomains.Add(androidApp ? uriString : domainName.BaseDomain);
|
||||
}
|
||||
|
||||
if(androidApp && androidAppWebUriString != null && !matchingFuzzyDomains.Any())
|
||||
if(androidApp && androidAppWebUriString != null &&
|
||||
!matchingFuzzyDomains.Any() && !matchingDomains.Contains(androidAppWebUriString))
|
||||
{
|
||||
matchingFuzzyDomains.Add(androidAppWebUriString);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue