From ce4b56895e4a84c8d7de20b969d9f0046ff6d13e Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 10 Dec 2013 11:51:41 +1100 Subject: [PATCH] fixes installer login check --- src/Umbraco.Web.UI/install/Default.aspx.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI/install/Default.aspx.cs b/src/Umbraco.Web.UI/install/Default.aspx.cs index 345a0bc841..5a58949b8c 100644 --- a/src/Umbraco.Web.UI/install/Default.aspx.cs +++ b/src/Umbraco.Web.UI/install/Default.aspx.cs @@ -64,12 +64,16 @@ namespace Umbraco.Web.UI.Install if (string.IsNullOrWhiteSpace(GlobalSettings.ConfigurationStatus) == false) { var result = Security.ValidateCurrentUser(new HttpContextWrapper(Context)); - - if (result == ValidateRequestAttempt.FailedTimedOut || result == ValidateRequestAttempt.FailedNoPrivileges) + + switch (result) { - Response.Redirect( - //We must add the token to prevent CSRF attacks since the logout occurs on a GET not a POST + case ValidateRequestAttempt.FailedNoPrivileges: + case ValidateRequestAttempt.FailedTimedOut: + case ValidateRequestAttempt.FailedNoContextId: + Response.Redirect( + //We must add the token to prevent CSRF attacks since the logout occurs on a GET not a POST SystemDirectories.Umbraco + "/logout.aspx?redir=" + Server.UrlEncode(Request.RawUrl) + "&t=" + Security.UmbracoUserContextId); + break; } }