We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f569b94 commit afb3308Copy full SHA for afb3308
src/auth/nip98.rs
@@ -33,10 +33,12 @@ impl<'r> FromRequest<'r> for Nip98Auth {
33
if event.kind != Kind::HttpAuth {
34
return Outcome::Error((Status::new(401), "Wrong event kind"));
35
}
36
- if event.created_at > Timestamp::now() {
+ if (event.created_at.as_u64() as i64 -
37
+ Timestamp::now().as_u64() as i64).abs() >= 60
38
+ {
39
return Outcome::Error((
40
Status::new(401),
- "Created timestamp is in the future",
41
+ "Created timestamp is out of range",
42
));
43
44
0 commit comments