From 64d780ce4c69990078e4d44bba13002492b87255 Mon Sep 17 00:00:00 2001 From: Mario Prausa Date: Tue, 30 Jul 2024 15:23:56 +0200 Subject: [PATCH] Fix calculation of expiration timestamp `currentTimestamp` is in millis already which is why it should not be mulitplied by 1000. This bug was introduced in bba32e09. --- src/main/java/org/jenkinsci/plugins/oic/OicCredentials.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/oic/OicCredentials.java b/src/main/java/org/jenkinsci/plugins/oic/OicCredentials.java index 48aaaf0c..843dea50 100644 --- a/src/main/java/org/jenkinsci/plugins/oic/OicCredentials.java +++ b/src/main/java/org/jenkinsci/plugins/oic/OicCredentials.java @@ -48,7 +48,7 @@ public OicCredentials( if (expiresInSeconds != null && expiresInSeconds > 0) { long allowedClockSkewFixed = Util.fixNull(allowedClockSkewSeconds, 60L); - this.expiresAtMillis = (currentTimestamp + expiresInSeconds + allowedClockSkewFixed) * 1000; + this.expiresAtMillis = currentTimestamp + (expiresInSeconds + allowedClockSkewFixed) * 1000; } else { this.expiresAtMillis = null; }