]> Untitled Git - lemmy.git/commitdiff
fix timestamp condition #1462
authorBogdan Mart <mart.bogdan@gmail.com>
Sat, 13 Mar 2021 20:18:26 +0000 (22:18 +0200)
committerBogdan Mart <mart.bogdan@gmail.com>
Sat, 13 Mar 2021 20:18:26 +0000 (22:18 +0200)
crates/api/src/lib.rs

index 2dbfb4354cd8dfeafdffb64b216986d0f9bd4b4f..0f77da5e8959ea0671742ef00df12054bd05d785 100644 (file)
@@ -132,7 +132,7 @@ pub(crate) async fn get_user_safe_settings_from_jwt(
   }
   // if user's token was issued before user's password reset.
   let user_validation_time = user.validator_time.timestamp_millis() / 1000;
-  if user_validation_time >= claims.iat {
+  if user_validation_time > claims.iat {
     return Err(ApiError::err("not_logged_in").into());
   }
   Ok(user)