Skip to content

Commit

Permalink
remove duplicate keyid into var keysAttempted (#2899)
Browse files Browse the repository at this point in the history
Co-authored-by: jennyf19 <jeferrie@microsoft.com>
Co-authored-by: kellyyangsong <69649063+kellyyangsong@users.noreply.github.com>
Co-authored-by: Peter <34331512+pmaytak@users.noreply.github.com>
  • Loading branch information
4 people authored Jan 6, 2025
1 parent fd9be46 commit 82cd3fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ private JwtSecurityToken ValidateSignature(string token, JwtSecurityToken jwtTok

if (key != null)
{
(keysAttempted ??= new StringBuilder()).Append(key.ToString()).Append(" , KeyId: ").AppendLine(key.KeyId);
(keysAttempted ??= new StringBuilder()).Append(key.ToString());
if (kidExists && !kidMatched && key.KeyId != null)
kidMatched = jwtToken.Header.Kid.Equals(key.KeyId, key is X509SecurityKey ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
}
Expand Down

0 comments on commit 82cd3fd

Please sign in to comment.