Handle ":" in passwords

Not a good idea, but it can happen.

Change-Id: Ia7597b5126514f1ab9faefc2ac2d1d2588834640
This commit is contained in:
James E. Blair 2019-10-21 08:44:54 -07:00
parent d97cd6ccf7
commit 2efd3d602f

View File

@ -120,7 +120,7 @@ class Authorization(cherrypy.Tool):
if auth_header and 'Basic' in auth_header:
cred = auth_header.split()[1]
cred = base64.decodebytes(cred.encode('utf8')).decode('utf8')
user, pw = cred.split(':')
user, pw = cred.split(':', 1)
if not self.check(self.rw, user, pw):
self.unauthorized()
else: