From f809170c51b684abd7065ce21f86a63bd7e0b9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Gon=C3=A7alves?= Date: Wed, 20 Jul 2022 16:27:49 +0100 Subject: [PATCH] [SG-467] Fix environment url validations (#1999) * [SG-467] Fixed url validation so it works with or without http or https * [SG-467] Validation has been refactored for simplicity. --- src/App/Pages/Accounts/EnvironmentPageViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Pages/Accounts/EnvironmentPageViewModel.cs b/src/App/Pages/Accounts/EnvironmentPageViewModel.cs index 07ce99a45..90fc8e698 100644 --- a/src/App/Pages/Accounts/EnvironmentPageViewModel.cs +++ b/src/App/Pages/Accounts/EnvironmentPageViewModel.cs @@ -70,7 +70,7 @@ namespace Bit.App.Pages { bool IsUrlValid(string url) { - return string.IsNullOrEmpty(url) || Uri.IsWellFormedUriString(url, UriKind.Absolute); + return string.IsNullOrEmpty(url) || Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute); } return IsUrlValid(BaseUrl)