From d86c4f2c23bc0cad8f709ffe83933c7d8d9dc70f Mon Sep 17 00:00:00 2001 From: one230six <163239332+one230six@users.noreply.github.com> Date: Sun, 17 Mar 2024 21:28:10 +0800 Subject: [PATCH] Signed-off-by: one230six <723682061@qq.com> (#4422) Signed-off-by: one230six <723682061@qq.com> --- src/api/core/two_factor/authenticator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/core/two_factor/authenticator.rs b/src/api/core/two_factor/authenticator.rs index e6e283e9..4d2d2781 100644 --- a/src/api/core/two_factor/authenticator.rs +++ b/src/api/core/two_factor/authenticator.rs @@ -156,7 +156,7 @@ pub async fn validate_totp_code( let time = (current_timestamp + step * 30i64) as u64; let generated = totp_custom::(30, 6, &decoded_secret, time); - // Check the the given code equals the generated and if the time_step is larger then the one last used. + // Check the given code equals the generated and if the time_step is larger then the one last used. if generated == totp_code && time_step > i64::from(twofactor.last_used) { // If the step does not equals 0 the time is drifted either server or client side. if step != 0 {