U4-2952 - Preview mode causes ysod - null reference

Created by Per Ploug 26 Sep 2013, 09:06:14 Updated by andrew shearer 18 Oct 2013, 10:57:20

Is duplicated by: U4-2964

Is duplicated by: U4-2965

Is duplicated by: U4-2969

Setting a document in preview mode, makes the entire system throw a ysod, both when view the preview, and browsing the backoffice:

public static UmbracoBackOfficeIdentity GetCurrentIdentity(this HttpContextBase http) Line 15: { Line 16: return http.User.Identity as UmbracoBackOfficeIdentity;
Line 17: }

[NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Core.Security.AuthenticationExtensions.GetCurrentIdentity(HttpContextBase http) in c:\Umbraco-CMS\src\Umbraco.Core\Security\AuthenticationExtensions.cs:16 Umbraco.Web.Security.WebSecurity.GetUserId() in c:\Umbraco-CMS\src\Umbraco.Web\Security\WebSecurity.cs:259 Umbraco.Web.Security.WebSecurity.get_CurrentUser() in c:\Umbraco-CMS\src\Umbraco.Web\Security\WebSecurity.cs:119 Umbraco.Web.UmbracoContext.get_UmbracoUser() in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoContext.cs:394 Umbraco.Web.UmbracoContext.DetectInPreviewModeFromRequest() in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoContext.cs:412 Umbraco.Web.UmbracoContext..ctor(HttpContextBase httpContext, ApplicationContext applicationContext, IPublishedCaches publishedCaches, WebSecurity webSecurity, Nullable`1 preview) in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoContext.cs:201 Umbraco.Web.UmbracoContext.EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, WebSecurity webSecurity, Boolean replaceContext) in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoContext.cs:142 Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoModule.cs:69 Umbraco.Web.UmbracoModule.b__5(Object sender, EventArgs e) in c:\Umbraco-CMS\src\Umbraco.Web\UmbracoModule.cs:577 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164

Comments

Per Ploug 28 Sep 2013, 08:17:47

also, there is currently no section authentication check in the editors it seems, probably also related to the user auth changes to form authentication made


Shannon Deminick 30 Sep 2013, 06:06:56

fixed in 33599a15a298e1bf58aea997e110e464206b1c08


andrew shearer 18 Oct 2013, 10:57:20

I've come across this too. An app restart doesn't revert back to a working state either.


Priority: Major

Type: Task

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0

Sprint:

Story Points:

Cycle: