Skip to content

Commit

Permalink
Test if ClaimsPrincipal.Identity is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvand committed May 7, 2024
1 parent 9297ddd commit 825a80b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log for ~~AzureCP~~ EntraCP

## Unreleased

* Fix an NullReferenceException in a very rare scenario where ClaimsPrincipal.Identity is null

## EntraCP v25.0.20240503.33 enhancements & bug-fixes - Published in May 3, 2024

* Update the global configuration page to give the possibility to update the credentials of tenants already registered - https://github.com/Yvand/EntraCP/pull/248
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public OperationContext(ClaimsProviderSettings settings, OperationType currentRe
if (httpctx != null)
{
WIF4_5.ClaimsPrincipal cp = httpctx.User as WIF4_5.ClaimsPrincipal;
if (cp != null)
if (cp != null && cp.Identity != null)
{
if (SPClaimProviderManager.IsEncodedClaim(cp.Identity.Name))
{
Expand Down

0 comments on commit 825a80b

Please sign in to comment.