Skip to content

Commit e228df2

Browse files
Remove exception to avoid logging JWT token
Change-Id: I9b298d17de9fdfc5ff405d346dda56dfb729e619
1 parent 30c6c67 commit e228df2

File tree

1 file changed

+2
-1
lines changed
  • cf-java-logging-support-servlet/src/main/java/com/sap/hcp/cf/logging/servlet/dynlog

1 file changed

+2
-1
lines changed

cf-java-logging-support-servlet/src/main/java/com/sap/hcp/cf/logging/servlet/dynlog/TokenDecoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public DecodedJWT validateAndDecodeToken(String token) throws DynamicLogLevelExc
3636
throw new DynamicLogLevelException("Token provided to dynamically change the log-level on thread-level is outdated");
3737
}
3838
} catch (JWTVerificationException e) {
39-
throw new DynamicLogLevelException("Token could not be verified", e);
39+
// Exception is not attached to avoid logging of JWT token
40+
throw new DynamicLogLevelException("Token could not be verified");
4041
}
4142
}
4243
}

0 commit comments

Comments
 (0)