Browse Source

Update email.rs

removed current_time
pull/5719/head
setsecurity 1 week ago
committed by GitHub
parent
commit
85ed1e10bd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/api/core/two_factor/email.rs

4
src/api/core/two_factor/email.rs

@ -204,7 +204,7 @@ pub async fn validate_email_code_str(user_id: &UserId, token: &str, data: &str,
.map_res("Two factor not found")?; .map_res("Two factor not found")?;
let Some(issued_token) = &email_data.last_token else { let Some(issued_token) = &email_data.last_token else {
err!( err!(
format!("No token available! Server time: {} IP: {}", current_time.format("%F %T UTC"), ip.ip), format!("No token available! IP: {}", ip.ip),
ErrorEvent { ErrorEvent {
event: EventType::UserFailedLogIn2fa event: EventType::UserFailedLogIn2fa
} }
@ -220,7 +220,7 @@ pub async fn validate_email_code_str(user_id: &UserId, token: &str, data: &str,
twofactor.save(conn).await?; twofactor.save(conn).await?;
err!( err!(
format!("Token is invalid! Server time: {} IP: {}", current_time.format("%F %T UTC"), ip.ip), format!("Token is invalid! IP: {}", ip.ip),
ErrorEvent { ErrorEvent {
event: EventType::UserFailedLogIn2fa event: EventType::UserFailedLogIn2fa
} }

Loading…
Cancel
Save