reta commented on code in PR #3165:
URL: https://github.com/apache/cxf/pull/3165#discussion_r3336840766
##########
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java:
##########
@@ -88,6 +88,13 @@ public static void
setCertificateThumbprintConfirmation(MessageContext mc, X509C
}
}
+ public static boolean compareTokens(String token1, String token2) {
+ if (token1 == null || token2 == null) {
+ return false;
+ }
+ return MessageDigest.isEqual(StringUtils.toBytesUTF8(token1),
StringUtils.toBytesUTF8(token2));
Review Comment:
Thanks @dxbjavid , it looks somewhat non-intuitive to rely on
`MessageDigest.isEqual` here (since tokens are not really message digests) but
it does not look harmful. @coheigea wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]