From 0debf9c34faa05201b52577755a97a229c8a61be Mon Sep 17 00:00:00 2001 From: yawka Date: Thu, 7 Nov 2013 19:05:50 +0200 Subject: [PATCH] Add check is path is whitespace --- src/Umbraco.Core/Configuration/GlobalSettings.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index 4526ece5f3..3dbc99fba9 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -704,6 +704,8 @@ namespace Umbraco.Core.Configuration StartsWithContainer _newReservedList = new StartsWithContainer(); foreach (string reservedUrl in _reservedUrlsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { + if (string.IsNullOrWhiteSpace(reservedUrl)) + continue; //resolves the url to support tilde chars string reservedUrlTrimmed = IOHelper.ResolveUrl(reservedUrl).Trim().ToLower(); if (reservedUrlTrimmed.Length > 0) @@ -713,6 +715,8 @@ namespace Umbraco.Core.Configuration foreach (string reservedPath in _reservedPathsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { bool trimEnd = !reservedPath.EndsWith("/"); + if (string.IsNullOrWhiteSpace(reservedPath)) + continue; //resolves the url to support tilde chars string reservedPathTrimmed = IOHelper.ResolveUrl(reservedPath).Trim().ToLower();