diff --git a/src/Umbraco.Web/Install/InstallHelper.cs b/src/Umbraco.Web/Install/InstallHelper.cs index 143067f6a1..d39b16f6ac 100644 --- a/src/Umbraco.Web/Install/InstallHelper.cs +++ b/src/Umbraco.Web/Install/InstallHelper.cs @@ -42,7 +42,7 @@ namespace Umbraco.Web.Install { return new List { - new NewInstallStep(_umbContext.Application), + new NewInstallStep(_umbContext.HttpContext, _umbContext.Application), new UpgradeStep(), new FilePermissionsStep(), new MajorVersion7UpgradeReport(_umbContext.Application), diff --git a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs index baa94c304e..4d8e9c5a4b 100644 --- a/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/NewInstallStep.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Configuration; +using System.Web; using System.Web.Security; using Umbraco.Core; using Umbraco.Core.Configuration; @@ -22,10 +23,12 @@ namespace Umbraco.Web.Install.InstallSteps "User", 20, "")] internal class NewInstallStep : InstallSetupStep { + private readonly HttpContextBase _http; private readonly ApplicationContext _applicationContext; - public NewInstallStep(ApplicationContext applicationContext) + public NewInstallStep(HttpContextBase http, ApplicationContext applicationContext) { + _http = http; _applicationContext = applicationContext; } @@ -111,7 +114,7 @@ namespace Umbraco.Web.Install.InstallSteps //the continue install UI : "continueinstall"; } } - + public override bool RequiresExecution(UserModel model) { //now we have to check if this is really a new install, the db might be configured and might contain data @@ -136,6 +139,10 @@ namespace Umbraco.Web.Install.InstallSteps } else { + // In this one case when it's a brand new install and nothing has been configured, make sure the + // back office cookie is cleared so there's no old cookies lying around causing problems + _http.ExpireCookie(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName); + return true; } }