Browse Source

Remove unecessary email normalization (#4840)

pull/4869/head
Timshel 2 months ago
committed by GitHub
parent
commit
3466a8040e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/api/core/two_factor/duo.rs

4
src/api/core/two_factor/duo.rs

@ -281,10 +281,6 @@ fn sign_duo_values(key: &str, email: &str, ikey: &str, prefix: &str, expire: i64
} }
pub async fn validate_duo_login(email: &str, response: &str, conn: &mut DbConn) -> EmptyResult { pub async fn validate_duo_login(email: &str, response: &str, conn: &mut DbConn) -> EmptyResult {
// email is as entered by the user, so it needs to be normalized before
// comparison with auth_user below.
let email = &email.to_lowercase();
let split: Vec<&str> = response.split(':').collect(); let split: Vec<&str> = response.split(':').collect();
if split.len() != 2 { if split.len() != 2 {
err!( err!(

Loading…
Cancel
Save