Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 664eebe

Browse files
committed
DistributedCacheStateDataFormatter should handle failed Unprotect workflows #2533
1 parent 5019ff7 commit 664eebe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Infrastructure/DistributedCacheStateDataFormatter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ public AuthenticationProperties Unprotect(string protectedText, string purpose)
9292
var cacheKey = $"{CacheKeyPrefix}-{purpose}-{key}";
9393
var json = Cache.GetString(cacheKey);
9494

95+
if (json == null)
96+
{
97+
return null;
98+
}
99+
95100
return ObjectSerializer.FromString<AuthenticationProperties>(json);
96101
}
97102
}

0 commit comments

Comments
 (0)