1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-21 05:00:28 +01:00

Signed-off-by: one230six <723682061@qq.com> (#4422)

Signed-off-by: one230six <723682061@qq.com>
Dieser Commit ist enthalten in:
one230six 2024-03-17 21:28:10 +08:00 committet von GitHub
Ursprung 6d73f30b4f
Commit d86c4f2c23
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -156,7 +156,7 @@ pub async fn validate_totp_code(
let time = (current_timestamp + step * 30i64) as u64;
let generated = totp_custom::<Sha1>(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 {