Handle ":" in passwords
Not a good idea, but it can happen. Change-Id: Ia7597b5126514f1ab9faefc2ac2d1d2588834640
This commit is contained in:
parent
d97cd6ccf7
commit
2efd3d602f
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user