diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 0a0c000..af89f2f 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.2.505")] -[assembly: AssemblyFileVersion("3.0.2.505")] +[assembly: AssemblyVersion("3.0.2.506")] +[assembly: AssemblyFileVersion("3.0.2.506")] diff --git a/Core/UrlTools.cs b/Core/UrlTools.cs index 89511f5..97e5341 100644 --- a/Core/UrlTools.cs +++ b/Core/UrlTools.cs @@ -41,7 +41,12 @@ namespace ScrewTurn.Wiki { // Extract the current namespace, if any string nspace = GetCurrentNamespace() + ""; - if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1); // Trim Namespace. from pageName + if(!string.IsNullOrEmpty(nspace)) { + // Verify that namespace exists + if(Pages.FindNamespace(nspace) == null) HttpContext.Current.Response.Redirect("~/PageNotFound.aspx?Page=" + pageName); + } + // Trim Namespace. from pageName + if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1); string queryString = ""; // Empty or begins with ampersand, not question mark try {