1
0
mirror of https://github.com/etesync/server synced 2024-12-27 09:48:24 +00:00

Login: return an UNAUTHORIZED (401) error on bad username/password, not 400.

This commit is contained in:
Tom Hacohen 2020-08-18 12:04:42 +03:00
parent 5af2aeda7e
commit 693a5ec778

View File

@ -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_400_BAD_REQUEST)
return Response({'code': 'login_bad_signature'}, status=status.HTTP_401_UNAUTHORIZED)
return None