mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
also ignore binascii error when decoding the user in access log
This commit is contained in:
parent
38261b5235
commit
45f008187b
@ -4,6 +4,7 @@
|
|||||||
# See the NOTICE for more information.
|
# See the NOTICE for more information.
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
import binascii
|
||||||
import time
|
import time
|
||||||
import logging
|
import logging
|
||||||
logging.Logger.manager.emittedNoHandlerWarning = 1
|
logging.Logger.manager.emittedNoHandlerWarning = 1
|
||||||
@ -394,6 +395,9 @@ class Logger(object):
|
|||||||
except TypeError as exc:
|
except TypeError as exc:
|
||||||
self.debug("Couldn't get username: %s", exc)
|
self.debug("Couldn't get username: %s", exc)
|
||||||
return user
|
return user
|
||||||
|
except binascii.Error as exc:
|
||||||
|
self.debug("Couldn't get username: %s", exc)
|
||||||
|
return user
|
||||||
if len(auth) == 2:
|
if len(auth) == 2:
|
||||||
user = auth[0]
|
user = auth[0]
|
||||||
return user
|
return user
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user