You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "coheigea (via GitHub)" <gi...@apache.org> on 2026/05/22 14:31:38 UTC
[PR] Handle NaN or infinite times in JSON/JWT [cxf]
coheigea opened a new pull request, #3137:
URL: https://github.com/apache/cxf/pull/3137
(no comment)
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Handle NaN or infinite times in JSON/JWT [cxf]
Posted by "coheigea (via GitHub)" <gi...@apache.org>.
coheigea commented on code in PR #3137:
URL: https://github.com/apache/cxf/pull/3137#discussion_r3289484766
##########
rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java:
##########
@@ -50,9 +50,14 @@ public static void validateJwtExpiry(JwtClaims claims, int clockOffset, boolean
return;
}
Instant now = Instant.now();
- Instant expires = Instant.ofEpochMilli(expiryTime * 1000L);
- if (clockOffset != 0) {
- expires = expires.plusSeconds(clockOffset);
+ Instant expires;
+ try {
Review Comment:
@reta 1000L can overflow before creating the Instant, producing a wrong timestamp.
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Handle NaN or infinite times in JSON/JWT [cxf]
Posted by "coheigea (via GitHub)" <gi...@apache.org>.
coheigea merged PR #3137:
URL: https://github.com/apache/cxf/pull/3137
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Handle NaN or infinite times in JSON/JWT [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #3137:
URL: https://github.com/apache/cxf/pull/3137#discussion_r3289202590
##########
rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwt/JwtUtils.java:
##########
@@ -50,9 +50,14 @@ public static void validateJwtExpiry(JwtClaims claims, int clockOffset, boolean
return;
}
Instant now = Instant.now();
- Instant expires = Instant.ofEpochMilli(expiryTime * 1000L);
- if (clockOffset != 0) {
- expires = expires.plusSeconds(clockOffset);
+ Instant expires;
+ try {
Review Comment:
@coheigea apologies, what changed here? `Instant.ofEpochMilli(expiryTime * 1000L)` is equivalent to `Instant.ofEpochSecond(expiryTime)` unless we are talking about overflow ...
--
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: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org