From 27f9cf893e87cb3a97856ff2d84d04c45ab213e8 Mon Sep 17 00:00:00 2001 From: Trezy Date: Mon, 11 May 2026 15:45:24 -0500 Subject: [PATCH] fix: reject JWT at exact expiry second Signed-off-by: Trezy --- src/spaces/credential.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spaces/credential.rs b/src/spaces/credential.rs index 33c429e..5237291 100644 --- a/src/spaces/credential.rs +++ b/src/spaces/credential.rs @@ -57,7 +57,7 @@ pub fn verify_grant(token: &str, secret: &[u8; 32]) -> Result data.claims.exp { + if now >= data.claims.exp { return Err(AppError::Auth("member grant has expired".into())); } @@ -173,7 +173,7 @@ pub fn verify_credential( .unwrap() .as_secs(); - if now > claims.exp { + if now >= claims.exp { return Err(AppError::Auth("credential has expired".into())); } -- 2.51.2