1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-09-07 18:39:39 +02:00

Duo: use the formatted db email (#4779)

Dieser Commit ist enthalten in:
Timshel 2024-07-25 20:25:44 +02:00 committet von GitHub
Ursprung 529c39c6c5
Commit f858523d92
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
2 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -423,8 +423,6 @@ pub async fn validate_duo_login(
device_identifier: &str,
conn: &mut DbConn,
) -> EmptyResult {
let email = &email.to_lowercase();
// Result supplied to us by clients in the form "<authz code>|<state>"
let split: Vec<&str> = two_factor_token.split('|').collect();
if split.len() != 2 {

Datei anzeigen

@ -524,12 +524,12 @@ async fn twofactor_auth(
match CONFIG.duo_use_iframe() {
true => {
// Legacy iframe prompt flow
duo::validate_duo_login(data.username.as_ref().unwrap().trim(), twofactor_code, conn).await?
duo::validate_duo_login(&user.email, twofactor_code, conn).await?
}
false => {
// OIDC based flow
duo_oidc::validate_duo_login(
data.username.as_ref().unwrap().trim(),
&user.email,
twofactor_code,
data.client_id.as_ref().unwrap(),
data.device_identifier.as_ref().unwrap(),