summaryrefslogtreecommitdiff
path: root/src/mailman/rest/root.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/root.py')
-rw-r--r--src/mailman/rest/root.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mailman/rest/root.py b/src/mailman/rest/root.py
index 93a8f0086..a8e975fed 100644
--- a/src/mailman/rest/root.py
+++ b/src/mailman/rest/root.py
@@ -69,7 +69,8 @@ class Root:
b'401 Unauthorized',
b'The REST API requires authentication')
if request.auth.startswith('Basic '):
- credentials = b64decode(request.auth[6:])
+ # b64decode() returns bytes, but we require a str.
+ credentials = b64decode(request.auth[6:]).decode('utf-8')
username, password = credentials.split(':', 1)
if (username != config.webservice.admin_user or
password != config.webservice.admin_pass):