From 70a814a20c0220517392f6acefcf94a5bab04e76 Mon Sep 17 00:00:00 2001 From: sebastiaan Date: Thu, 6 Sep 2012 12:25:04 -0200 Subject: [PATCH] Fixes U4-741 - umbracoReservedPaths was not properly filtering after removing trailing slashes --- src/Umbraco.Core/Configuration/GlobalSettings.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index 4eb22fae1f..a24eb10796 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -806,14 +806,17 @@ namespace Umbraco.Core.Configuration public int Compare(string part, string whole) { // let the default string comparer deal with null or when part is not smaller then whole - if (part == null || whole == null) + if (part == null || whole == null || part.Length >= whole.Length) return _stringComparer.Compare(part, whole); - //trim the end '/' of each - part = part.TrimEnd('/'); - whole = whole.TrimEnd('/'); - if (part.Length >= whole.Length) - return _stringComparer.Compare(part, whole); + // Reverted changeset 4d5a20d6124d because it will match with + // anything starting with install and umbraco see issue U4-741 + + ////trim the end '/' of each + //part = part.TrimEnd('/'); + //whole = whole.TrimEnd('/'); + //if (part.Length >= whole.Length) + // return _stringComparer.Compare(part, whole); // loop through all characters that part and whole have in common int pos = 0;