Skip to content

Commit

Permalink
Large nested claim set causes stack overflow in toString
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreden committed Feb 11, 2025
1 parent 2d589b0 commit 3e6b37f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,11 @@ public void authenticate(final AuthenticationToken authenticationToken, final Ac
+ tokenPrincipal
+ "] with header ["
+ jwtAuthenticationToken.getSignedJWT().getHeader()
+ "] and claimSet ["
+ jwtAuthenticationToken.getJWTClaimsSet()
+ "]";

if (logger.isTraceEnabled()) {
logger.trace(msg, ex);
// Large claim sets can cause stack overflow error, so only log when trace enabled
logger.trace(msg + " and claimSet [" + jwtAuthenticationToken.getJWTClaimsSet() + "]", ex);
} else {
logger.debug(msg + " Cause: " + ex.getMessage()); // only log the stack trace at trace level
}
Expand Down

0 comments on commit 3e6b37f

Please sign in to comment.