From d09f670a77e38e2d1a1208d079b7a7b3dc7512e7 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 18 Nov 2018 02:31:37 -0700 Subject: [PATCH] Convert username to lower case --- authserver/authserver/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authserver/authserver/api/views.py b/authserver/authserver/api/views.py index 3fb18ac..eefad76 100644 --- a/authserver/authserver/api/views.py +++ b/authserver/authserver/api/views.py @@ -54,7 +54,7 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet): @api_view(["POST"]) def login(request): - username = request.data.get("username") + username = request.data.get("username").lower() password = request.data.get("password") if username is None or password is None: return Response({'error': 'Please provide both username and password'},