From 8593ab13578dec500b5768c8e21f3d1afc649630 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 18 Aug 2020 12:24:30 +0300 Subject: [PATCH] Login: add a user visible error on password failure. --- django_etebase/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_etebase/views.py b/django_etebase/views.py index a39d443..c45630b 100644 --- a/django_etebase/views.py +++ b/django_etebase/views.py @@ -683,7 +683,7 @@ class AuthenticationViewSet(viewsets.ViewSet): try: verify_key.verify(response_raw, signature) except nacl.exceptions.BadSignatureError: - return Response({'code': 'login_bad_signature'}, status=status.HTTP_401_UNAUTHORIZED) + return Response({'code': 'login_bad_signature', 'detail': 'Wrong password for user.'}, status=status.HTTP_401_UNAUTHORIZED) return None