fix: remove server timestamp in error message for invalid TOTP code to improve security
This commit is contained in:
parent
062cec5dfe
commit
c82a91e89d
1 changed files with 1 additions and 4 deletions
|
|
@ -252,10 +252,7 @@ pub async fn validate_totp(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(AppError::Unauthorized(format!(
|
Err(AppError::Unauthorized("Invalid TOTP code.".to_string()))
|
||||||
"Invalid TOTP code. Server time: {}",
|
|
||||||
chrono::Utc::now().format("%Y-%m-%d %H:%M:%S UTC")
|
|
||||||
)))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Generates a recovery code (20 characters, Base32 encoded).
|
/// Generates a recovery code (20 characters, Base32 encoded).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue