mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
parent
4a1c402e2c
commit
a7ead9831e
@ -469,8 +469,7 @@ class Logger(object):
|
|||||||
# so we need to convert it to a byte string
|
# so we need to convert it to a byte string
|
||||||
auth = base64.b64decode(auth[1].strip().encode('utf-8'))
|
auth = base64.b64decode(auth[1].strip().encode('utf-8'))
|
||||||
# b64decode returns a byte string
|
# b64decode returns a byte string
|
||||||
auth = auth.decode('utf-8')
|
auth.split(b":", 1)[0].decode(UTF-8", "replace")
|
||||||
auth = auth.split(":", 1)
|
|
||||||
except (TypeError, binascii.Error, UnicodeDecodeError) as exc:
|
except (TypeError, binascii.Error, UnicodeDecodeError) as exc:
|
||||||
self.debug("Couldn't get username: %s", exc)
|
self.debug("Couldn't get username: %s", exc)
|
||||||
return user
|
return user
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user