Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-12-18 10:40:42 +01:00
Fix mail::send_incomplete_2fa_login panic issue (#4792)
- fixes https://github.com/dani-garcia/vaultwarden/issues/4528
Dieser Commit ist enthalten in:
Ursprung
a7be8fab9b
Commit
e7d5c17ff7
1 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen
|
@ -269,10 +269,18 @@ pub async fn send_incomplete_2fa_notifications(pool: DbPool) {
|
|||
"User {} did not complete a 2FA login within the configured time limit. IP: {}",
|
||||
user.email, login.ip_address
|
||||
);
|
||||
mail::send_incomplete_2fa_login(&user.email, &login.ip_address, &login.login_time, &login.device_name)
|
||||
match mail::send_incomplete_2fa_login(&user.email, &login.ip_address, &login.login_time, &login.device_name)
|
||||
.await
|
||||
.expect("Error sending incomplete 2FA email");
|
||||
login.delete(&mut conn).await.expect("Error deleting incomplete 2FA record");
|
||||
{
|
||||
Ok(_) => {
|
||||
if let Err(e) = login.delete(&mut conn).await {
|
||||
error!("Error deleting incomplete 2FA record: {e:#?}");
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
error!("Error sending incomplete 2FA email: {e:#?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren