Adding null check to avoid nullref exception on 292 in WebSecurity during install. Still getting nullref on line 115 during install.

This commit is contained in:
Lars-Erik Aabech
2018-07-28 01:12:14 +02:00
parent c885f850e9
commit ce490a4c5b

View File

@@ -289,7 +289,7 @@ namespace Umbraco.Web.Security
/// <returns></returns>
public bool IsAuthenticated()
{
return _httpContext.User.Identity.IsAuthenticated && _httpContext.GetCurrentIdentity(false) != null;
return _httpContext.User != null && _httpContext.User.Identity.IsAuthenticated && _httpContext.GetCurrentIdentity(false) != null;
}
protected override void DisposeResources()