Skip to content

Commit

Permalink
Merge pull request #267 from unixfox/fix-expire-check
Browse files Browse the repository at this point in the history
fix: wrong comparaison with expire time
  • Loading branch information
FireMasterK authored Dec 15, 2024
2 parents ec006b3 + 2562d70 commit 47007b9
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 47007b9

Please sign in to comment.