diff --git a/src/App/Models/Page/VaultViewLoginPageModel.cs b/src/App/Models/Page/VaultViewLoginPageModel.cs index 8b8b8ce52..4ada206a4 100644 --- a/src/App/Models/Page/VaultViewLoginPageModel.cs +++ b/src/App/Models/Page/VaultViewLoginPageModel.cs @@ -109,7 +109,25 @@ namespace Bit.App.Models.Page } } public bool ShowUri => !string.IsNullOrWhiteSpace(Uri); - public bool ShowLaunch => Uri.StartsWith("http://") || Uri.StartsWith("https://"); + + public bool ShowLaunch + { + get + { + if(!ShowUri) + { + return false; + } + + Uri uri; + if(!System.Uri.TryCreate(Uri, UriKind.Absolute, out uri)) + { + return false; + } + + return true; + } + } public string UriHost { diff --git a/src/App/Pages/Vault/VaultViewLoginPage.cs b/src/App/Pages/Vault/VaultViewLoginPage.cs index 280525e32..8a2af5e9e 100644 --- a/src/App/Pages/Vault/VaultViewLoginPage.cs +++ b/src/App/Pages/Vault/VaultViewLoginPage.cs @@ -74,7 +74,7 @@ namespace Bit.App.Pages // URI UriCell = new LabeledValueCell(AppResources.Website, button1Text: AppResources.Launch); UriCell.Value.SetBinding(Label.TextProperty, nameof(VaultViewLoginPageModel.UriHost)); - UriCell.Value.SetBinding(IsVisibleProperty, nameof(VaultViewLoginPageModel.ShowLaunch)); + UriCell.Button1.SetBinding(IsVisibleProperty, nameof(VaultViewLoginPageModel.ShowLaunch)); UriCell.Button1.Command = new Command(() => Device.OpenUri(new Uri(Model.Uri))); // Notes