Fix U4-8968: Add missing check for backoffice session in ClaimsIdentity (like the comment says)

This commit is contained in:
Asbjørn Riis-Knudsen
2016-09-13 22:36:14 +02:00
parent e0981f1c44
commit cbd980357b

View File

@@ -113,8 +113,8 @@ namespace Umbraco.Core.Security
//Otherwise convert to a UmbracoBackOfficeIdentity if it's auth'd and has the back office session
var claimsIdentity = http.User.Identity as ClaimsIdentity;
if (claimsIdentity != null && claimsIdentity.IsAuthenticated)
{
if (claimsIdentity != null && claimsIdentity.IsAuthenticated && claimsIdentity.HasClaim(x => x.Type == Constants.Security.SessionIdClaimType))
{
try
{
return UmbracoBackOfficeIdentity.FromClaimsIdentity(claimsIdentity);