Updating `login.rs` with generic `incorrect_login` response. (#3549)

pull/3526/head^2
rosenjcb 2023-07-10 04:27:38 -07:00 committed by GitHub
parent b35757b429
commit e7e60e0514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ impl Perform for Login {
let username_or_email = data.username_or_email.clone(); let username_or_email = data.username_or_email.clone();
let local_user_view = LocalUserView::find_by_email_or_name(context.pool(), &username_or_email) let local_user_view = LocalUserView::find_by_email_or_name(context.pool(), &username_or_email)
.await .await
.map_err(|e| LemmyError::from_error_message(e, "couldnt_find_that_username_or_email"))?; .map_err(|e| LemmyError::from_error_message(e, "incorrect_login"))?;
// Verify the password // Verify the password
let valid: bool = verify( let valid: bool = verify(
@ -32,7 +32,7 @@ impl Perform for Login {
) )
.unwrap_or(false); .unwrap_or(false);
if !valid { if !valid {
return Err(LemmyError::from_message("password_incorrect")); return Err(LemmyError::from_message("incorrect_login"));
} }
check_user_valid( check_user_valid(
local_user_view.person.banned, local_user_view.person.banned,