diff --git a/src/DotVVM.Framework.Tests.Common/Routing/UrlHelperTests.cs b/src/DotVVM.Framework.Tests.Common/Routing/UrlHelperTests.cs index 70f68b583b..f3abee3e8b 100644 --- a/src/DotVVM.Framework.Tests.Common/Routing/UrlHelperTests.cs +++ b/src/DotVVM.Framework.Tests.Common/Routing/UrlHelperTests.cs @@ -24,6 +24,7 @@ public class UrlHelperTests [DataRow(@"\\www.google.com", false)] // Chrome replaces backslashes with forward slashes... [DataRow(@"\/www.google.com", false)] [DataRow(@"/\www.google.com", false)] + [DataRow(@"/4aef74ba-388c-4292-9d53-98387e4f797b/reservation?LocationId=e5eed4c5-dfe9-45fd-a341-7408205d76ce&BeginDate=201909011300&Duration=2", true)] public void UrlHelper_IsLocalUrl(string url, bool exepectedResult) { var result = UrlHelper.IsLocalUrl(url); diff --git a/src/DotVVM.Framework/Routing/UrlHelper.cs b/src/DotVVM.Framework/Routing/UrlHelper.cs index 0000f9c33f..06661340aa 100644 --- a/src/DotVVM.Framework/Routing/UrlHelper.cs +++ b/src/DotVVM.Framework/Routing/UrlHelper.cs @@ -110,7 +110,7 @@ private static bool ContainsOnlyValidUrlChars(string url) { if ((url[i] < 'A' || url[i] > 'Z') && (url[i] < 'a' || url[i] > 'z') && (url[i] < '0' || url[i] > '9') && url[i] != '-' && url[i] != '.' && url[i] != '_' && url[i] != '~' && url[i] != '%' - && url[i] != '!' && url[i] != '$' && url[i] != '$' && url[i] != '\'' && url[i] != '(' && url[i] != ')' && url[i] != '*' && url[i] != '+' && url[i] != ',' && url[i] != ';' && url[i] != '=' + && url[i] != '!' && url[i] != '$' && url[i] != '&' && url[i] != '\'' && url[i] != '(' && url[i] != ')' && url[i] != '*' && url[i] != '+' && url[i] != ',' && url[i] != ';' && url[i] != '=' && url[i] != ':' && url[i] != '@' && url[i] != '/' && url[i] != '?') { return false;