From ce490a4c5bcefb98155b99ff8bd499361e7b794c Mon Sep 17 00:00:00 2001 From: Lars-Erik Aabech Date: Sat, 28 Jul 2018 01:12:14 +0200 Subject: [PATCH] Adding null check to avoid nullref exception on 292 in WebSecurity during install. Still getting nullref on line 115 during install. --- src/Umbraco.Web/Security/WebSecurity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index 0d089662f8..cee2c56d5f 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -289,7 +289,7 @@ namespace Umbraco.Web.Security /// 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()