Need to decode the b64decode output before calling split.
b64decode("YWRtaW46NzYxMmJlMTEtYjJmZS00NTA5LTlhY2ItMjYzZGQwZjJmMjUx")
b'admin:
7612be11-b2fe-4509-9acb-
263dd0f2f251'
b64decode("YWRtaW46NzYxMmJlMTEtYjJmZS00NTA5LTlhY2ItMjYzZGQwZjJmMjUx").decode()
'admin:
7612be11-b2fe-4509-9acb-
263dd0f2f251'
Fixes: http://tracker.ceph.com/issues/38522
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
response.headers['WWW-Authenticate'] = 'Basic realm="Login Required"'
return {'message': 'auth: No HTTP username/password'}
- username, password = b64decode(request.authorization[1]).split(':')
+ username, password = b64decode(request.authorization[1]).decode('utf-8').split(':')
# Check that the username exists
if username not in context.instance.keys: