Skip to content

Commit 83378b0

Browse files
authored
Merge pull request #8602 from Couchers-org/Frontend-Bug-PasswordWarningError
This PR fixing a UI issue in the log in page for English language
2 parents 5492b99 + 6e6c796 commit 83378b0

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

app/backend/src/couchers/i18n/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
"invalid_name": "Name not supported.",
124124
"invalid_notification_preference": "Invalid notification preference.",
125125
"invalid_password": "Wrong password.",
126+
"invalid_password_login": "Wrong username/email or password.",
126127
"invalid_phone": "Phone number must be in international format without punctuation.",
127128
"invalid_recipients": "Invalid recipients list.",
128129
"invalid_region": "Invalid region.",

app/backend/src/couchers/servicers/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def Authenticate(self, request: auth_pb2.AuthReq, context: CouchersContext, sess
465465
else:
466466
logger.debug("Wrong password")
467467
# wrong password
468-
context.abort_with_error_code(grpc.StatusCode.NOT_FOUND, "invalid_password")
468+
context.abort_with_error_code(grpc.StatusCode.NOT_FOUND, "invalid_password_login")
469469
else: # user not found
470470
# check if this is an email and they tried to sign up but didn't complete
471471
signup_flow = session.execute(

app/backend/src/tests/test_account.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def test_ChangePasswordV2_normal_wrong_password(db, fast_passwords):
282282
with pytest.raises(grpc.RpcError) as e:
283283
account.ChangePasswordV2(
284284
account_pb2.ChangePasswordV2Req(
285-
old_password="wrong password",
285+
old_password="Wrong password",
286286
new_password=new_password,
287287
)
288288
)
@@ -319,7 +319,7 @@ def test_ChangeEmailV2_wrong_password(db, fast_passwords):
319319
with pytest.raises(grpc.RpcError) as e:
320320
account.ChangeEmailV2(
321321
account_pb2.ChangeEmailV2Req(
322-
password="wrong password",
322+
password="Wrong password",
323323
new_email=new_email,
324324
)
325325
)
@@ -346,7 +346,7 @@ def test_ChangeEmailV2_wrong_email(db, fast_passwords):
346346
with pytest.raises(grpc.RpcError) as e:
347347
account.ChangeEmailV2(
348348
account_pb2.ChangeEmailV2Req(
349-
password="wrong password",
349+
password="Wrong password",
350350
new_email=new_email,
351351
)
352352
)

app/backend/src/tests/test_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ def test_unsuccessful_authenticate(db):
831831
with pytest.raises(grpc.RpcError) as e:
832832
reply = auth_api.Authenticate(auth_pb2.AuthReq(user=user.username, password="incorrectpassword"))
833833
assert e.value.code() == grpc.StatusCode.NOT_FOUND
834-
assert e.value.details() == "Wrong password."
834+
assert e.value.details() == "Wrong username/email or password."
835835

836836
# Invalid username
837837
with auth_api_session() as (auth_api, metadata_interceptor):

0 commit comments

Comments
 (0)