From 03164fb24f9bffeea4880033ff8656d48c0056f1 Mon Sep 17 00:00:00 2001 From: Dmitriy Dzygin Date: Tue, 15 Dec 2015 10:44:28 +0100 Subject: [PATCH] Fixed #65 Malformed short URL crash page generation --- Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs b/Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs index d2916b9882..1266d67202 100644 --- a/Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs +++ b/Composite/Plugins/Routing/Pages/DefaultPageUrlProvider.cs @@ -145,6 +145,10 @@ private PageUrlData ParseInternalUrl(string relativeUrl, out UrlKind urlKind) } string pathInfo = decodedPath.Substring(closingBracketOffset + 1); + if (pathInfo.Length > 0 && pathInfo[0] != '/') + { + return null; + } bool isUnpublished = pathInfo.Contains(UrlMarker_Unpublished); if (isUnpublished)