server/users: fix checking passwords with colons
This commit is contained in:
parent
59d8b0d4c5
commit
a1fbeb91a0
|
@ -24,7 +24,7 @@ def _get_user(ctx: rest.Context) -> Optional[model.User]:
|
||||||
'ValidationError',
|
'ValidationError',
|
||||||
'Only basic HTTP authentication is supported.')
|
'Only basic HTTP authentication is supported.')
|
||||||
username, password = base64.decodebytes(
|
username, password = base64.decodebytes(
|
||||||
credentials.encode('ascii')).decode('utf8').split(':')
|
credentials.encode('ascii')).decode('utf8').split(':', 1)
|
||||||
return _authenticate(username, password)
|
return _authenticate(username, password)
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
msg = (
|
msg = (
|
||||||
|
|
Loading…
Reference in New Issue