mirror of
https://github.com/etesync/server
synced 2024-11-22 16:58:08 +00:00
Login: add a user visible error on password failure.
This commit is contained in:
parent
693a5ec778
commit
8593ab1357
@ -683,7 +683,7 @@ class AuthenticationViewSet(viewsets.ViewSet):
|
|||||||
try:
|
try:
|
||||||
verify_key.verify(response_raw, signature)
|
verify_key.verify(response_raw, signature)
|
||||||
except nacl.exceptions.BadSignatureError:
|
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
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user