add protocol if missing

This commit is contained in:
Kyle Spearrin 2018-08-01 15:32:12 -04:00
parent acdfce7e88
commit 7c781b60c5

View file

@ -468,6 +468,10 @@ namespace Bit.App.Services
} }
} }
if(!loginUriString.Contains("://") && loginUriString.Contains("."))
{
loginUriString = "http://" + loginUriString;
}
string loginDomainName = null; string loginDomainName = null;
if(Uri.TryCreate(loginUriString, UriKind.Absolute, out Uri loginUri) if(Uri.TryCreate(loginUriString, UriKind.Absolute, out Uri loginUri)
&& DomainName.TryParseBaseDomain(loginUri.Host, out loginDomainName)) && DomainName.TryParseBaseDomain(loginUri.Host, out loginDomainName))