mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
better handle service identifiers
This commit is contained in:
parent
3fff0617fe
commit
f9028245d8
2 changed files with 15 additions and 2 deletions
|
@ -54,7 +54,15 @@ namespace Bit.iOS.Autofill
|
|||
public override void PrepareCredentialList(ASCredentialServiceIdentifier[] serviceIdentifiers)
|
||||
{
|
||||
_context.ServiceIdentifiers = serviceIdentifiers;
|
||||
_context.UrlString = serviceIdentifiers[0].Identifier;
|
||||
if(serviceIdentifiers.Length > 0)
|
||||
{
|
||||
var uri = serviceIdentifiers[0].Identifier;
|
||||
if(serviceIdentifiers[0].Type == ASCredentialServiceIdentifierType.Domain)
|
||||
{
|
||||
uri = string.Concat("https://", uri);
|
||||
}
|
||||
_context.UrlString = uri;
|
||||
}
|
||||
if(!CheckAuthed())
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -28,7 +28,12 @@ namespace Bit.iOS.Core.Models
|
|||
set
|
||||
{
|
||||
_uriString = value;
|
||||
if(_uriString != null && !_uriString.StartsWith(App.Constants.iOSAppProtocol) && _uriString.Contains("."))
|
||||
if(string.IsNullOrWhiteSpace(_uriString))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!_uriString.StartsWith(App.Constants.iOSAppProtocol) && _uriString.Contains("."))
|
||||
{
|
||||
if(!_uriString.Contains("://") && !_uriString.Contains(" "))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue