Commit c59e967e authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

use token instead of $token for the username in token auth

(because escaping '$' in the shell is an unnecessary burden)
parent 70d67df2
......@@ -173,7 +173,7 @@ def jwt_auth(request):
return HttpResponse(status=401)
username, password = base64.b64decode(credentials).decode('utf-8').split(':', 1)
#log.debug('HTTP_AUTHORIZATION %s username %s', auth_header, username)
if username == "$token":
if username == "token":
if len(password) < MIN_TOKEN_SIZE:"provided token is too short")
return HttpResponse(status=401)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment