From 2562d701b0180e356b0d9de0b44aaf6c9de1c689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milien=20=28perso=29?= <4016501+unixfox@users.noreply.github.com> Date: Sat, 14 Dec 2024 18:29:43 +0100 Subject: [PATCH] fix: wrong comparaison with expire time --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index b5f62b2..daed748 100644 --- a/src/main.rs +++ b/src/main.rs @@ -290,7 +290,7 @@ async fn index(req: HttpRequest) -> Result> { let now = now.duration_since(UNIX_EPOCH) .expect("Time went backwards") .as_secs() as i64; - if now < expiry { + if now > expiry { return Err("Expire time in past".into()); } }