diff options
author | Magnus Hagander | 2019-12-21 16:09:01 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-12-21 16:11:03 +0000 |
commit | 04e1ac94a5a38afc24671f89d413ade7f141754c (patch) | |
tree | 0c7f3a5f545502c38b9ab9b8c343fe4d0939678a /postgresqleu/util/middleware.py | |
parent | 6f95e6b077500d77b43268e02557eee5842cb0a5 (diff) |
Fix unicode error in basic authentication check
Diffstat (limited to 'postgresqleu/util/middleware.py')
-rw-r--r-- | postgresqleu/util/middleware.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/util/middleware.py b/postgresqleu/util/middleware.py index 7cdcd3b6..b77c8494 100644 --- a/postgresqleu/util/middleware.py +++ b/postgresqleu/util/middleware.py @@ -61,7 +61,7 @@ class GlobalLoginMiddleware(object): if len(auth) != 2: return http.HttpResponseForbidden("Invalid authentication") if auth[0].lower() == "basic": - user, pwd = base64.b64decode(auth[1]).split(':') + user, pwd = base64.b64decode(auth[1]).decode('utf8').split(':') if user == settings.GLOBAL_LOGIN_USER and pwd == settings.GLOBAL_LOGIN_PASSWORD: return None # Else we fall through and request a login prompt |