Skip to content

Commit

Permalink
fix: wrong comparaison with expire time
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox authored Dec 14, 2024
1 parent ec006b3 commit 2562d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
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());
}
}
Expand Down

0 comments on commit 2562d70

Please sign in to comment.