From: rosenjcb Date: Mon, 10 Jul 2023 11:27:38 +0000 (-0700) Subject: Updating `login.rs` with generic `incorrect_login` response. (#3549) X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/%7B%60/feeds/inbox/%24%7BUserService.Instance.auth%7D.xml%60%7D?a=commitdiff_plain;h=e7e60e0514d85aa0aca91d2d0157eb6aeefd2920;p=lemmy.git Updating `login.rs` with generic `incorrect_login` response. (#3549) --- diff --git a/crates/api/src/local_user/login.rs b/crates/api/src/local_user/login.rs index 9e211c9c..3bf17766 100644 --- a/crates/api/src/local_user/login.rs +++ b/crates/api/src/local_user/login.rs @@ -23,7 +23,7 @@ impl Perform for Login { let username_or_email = data.username_or_email.clone(); let local_user_view = LocalUserView::find_by_email_or_name(context.pool(), &username_or_email) .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 let valid: bool = verify( @@ -32,7 +32,7 @@ impl Perform for Login { ) .unwrap_or(false); if !valid { - return Err(LemmyError::from_message("password_incorrect")); + return Err(LemmyError::from_message("incorrect_login")); } check_user_valid( local_user_view.person.banned,