Skip to content

Commit 481ef24

Browse files
mateuszmanderatimabbott
authored andcommitted
auth: Tweak invalid credentials error message.
We decided this is the better string to use.
1 parent 94a86d4 commit 481ef24

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

zerver/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
' <a href="mailto:[email protected]">contact us</a>.'
5353
)
5454

55-
INVALID_ACCOUNT_CREDENTIALS_ERROR = gettext_lazy("Please enter a correct email and password.")
55+
INVALID_ACCOUNT_CREDENTIALS_ERROR = gettext_lazy("Incorrect email or password.")
5656
DEACTIVATED_ACCOUNT_ERROR = gettext_lazy(
5757
"Your account {username} has been deactivated."
5858
" Please contact your organization administrator to reactivate it."

zerver/tests/test_decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def test_login_deactivated_mirror_dummy(self) -> None:
856856
form = OurAuthenticationForm(request, payload)
857857
with self.settings(AUTHENTICATION_BACKENDS=("zproject.backends.EmailAuthBackend",)):
858858
self.assertFalse(form.is_valid())
859-
self.assertIn("Please enter a correct email", str(form.errors))
859+
self.assertIn("Incorrect email or password.", str(form.errors))
860860

861861
# Test a non-mirror-dummy deactivated user.
862862
user_profile.is_mirror_dummy = False

zerver/tests/test_signup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ def test_login_with_old_weak_password_after_hasher_change(self) -> None:
993993
def test_login_nonexistent_user(self) -> None:
994994
result = self.login_with_return("[email protected]", "xxx")
995995
self.assertEqual(result.status_code, 200)
996-
self.assert_in_response("Please enter a correct email and password.", result)
996+
self.assert_in_response("Incorrect email or password.", result)
997997
self.assert_logged_in_user_id(None)
998998

999999
def test_login_wrong_subdomain(self) -> None:
@@ -1009,7 +1009,7 @@ def test_login_wrong_subdomain(self) -> None:
10091009
],
10101010
)
10111011
self.assertEqual(result.status_code, 200)
1012-
expected_error = "Please enter a correct email and password."
1012+
expected_error = "Incorrect email or password."
10131013
self.assert_in_response(expected_error, result)
10141014
self.assert_logged_in_user_id(None)
10151015

0 commit comments

Comments
 (0)