diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs index b10616ec366d..a58f46be1b01 100644 --- a/src/SolutionInfo.cs +++ b/src/SolutionInfo.cs @@ -11,5 +11,5 @@ [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("7.3.1")] -[assembly: AssemblyInformationalVersion("7.3.1")] \ No newline at end of file +[assembly: AssemblyFileVersion("7.3.3")] +[assembly: AssemblyInformationalVersion("7.3.3")] \ No newline at end of file diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index d5504bae18d3..320f6dc22d89 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -2413,7 +2413,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\" True True - 7310 + 7330 / http://localhost:7330 False diff --git a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs index 755eafedcb7f..f608edaca4b8 100644 --- a/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs +++ b/src/Umbraco.Web/Security/Identity/AppBuilderExtensions.cs @@ -47,9 +47,6 @@ public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app if (appContext == null) throw new ArgumentNullException("appContext"); if (userMembershipProvider == null) throw new ArgumentNullException("userMembershipProvider"); - //Don't proceed if the app is not ready - if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return; - //Configure Umbraco user manager to be created per request app.CreatePerOwinContext( (options, owinContext) => BackOfficeUserManager.Create( @@ -78,9 +75,6 @@ public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app if (userMembershipProvider == null) throw new ArgumentNullException("userMembershipProvider"); if (customUserStore == null) throw new ArgumentNullException("customUserStore"); - //Don't proceed if the app is not ready - if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return; - //Configure Umbraco user manager to be created per request app.CreatePerOwinContext( (options, owinContext) => BackOfficeUserManager.Create( @@ -107,9 +101,6 @@ public static void ConfigureUserManagerForUmbracoBackOffice(thi if (appContext == null) throw new ArgumentNullException("appContext"); if (userManager == null) throw new ArgumentNullException("userManager"); - //Don't proceed if the app is not ready - if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return; - //Configure Umbraco user manager to be created per request app.CreatePerOwinContext(userManager); @@ -127,10 +118,7 @@ public static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuil { if (app == null) throw new ArgumentNullException("app"); if (appContext == null) throw new ArgumentNullException("appContext"); - - //Don't proceed if the app is not ready - if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return app; - + var authOptions = new UmbracoBackOfficeCookieAuthOptions( UmbracoConfig.For.UmbracoSettings().Security, GlobalSettings.TimeOutInMinutes, @@ -148,19 +136,23 @@ public static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuil identity => identity.GetUserId()), } }; + + app.UseUmbracoBackOfficeCookieAuthentication(authOptions, appContext); - //This is a custom middleware, we need to return the user's remaining logged in seconds - app.Use( - authOptions, - UmbracoConfig.For.UmbracoSettings().Security, - app.CreateLogger()); - - app.UseUmbracoBackOfficeCookieAuthentication(authOptions); + //don't apply if app isnot ready + if (appContext.IsUpgrading || appContext.IsConfigured) + { + //This is a custom middleware, we need to return the user's remaining logged in seconds + app.Use( + authOptions, + UmbracoConfig.For.UmbracoSettings().Security, + app.CreateLogger()); + } return app; } - internal static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, CookieAuthenticationOptions options) + internal static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, CookieAuthenticationOptions options, ApplicationContext appContext) { if (app == null) { @@ -170,12 +162,17 @@ internal static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBu //First the normal cookie middleware app.Use(typeof(CookieAuthenticationMiddleware), app, options); app.UseStageMarker(PipelineStage.Authenticate); + + //don't apply if app isnot ready + if (appContext.IsUpgrading || appContext.IsConfigured) + { + //Then our custom middlewares + app.Use(typeof(ForceRenewalCookieAuthenticationMiddleware), app, options, new SingletonUmbracoContextAccessor()); + app.UseStageMarker(PipelineStage.Authenticate); + app.Use(typeof(FixWindowsAuthMiddlware)); + app.UseStageMarker(PipelineStage.Authenticate); + } - //Then our custom middlewares - app.Use(typeof(ForceRenewalCookieAuthenticationMiddleware), app, options, new SingletonUmbracoContextAccessor()); - app.UseStageMarker(PipelineStage.Authenticate); - app.Use(typeof(FixWindowsAuthMiddlware)); - app.UseStageMarker(PipelineStage.Authenticate); return app; } @@ -192,9 +189,6 @@ public static IAppBuilder UseUmbracoBackOfficeExternalCookieAuthentication(this if (app == null) throw new ArgumentNullException("app"); if (appContext == null) throw new ArgumentNullException("appContext"); - //Don't proceed if the app is not ready - if (appContext.IsUpgrading == false && appContext.IsConfigured == false) return app; - app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = Constants.Security.BackOfficeExternalAuthenticationType,