mirror of
https://github.com/sprockets/sprockets.logging.git
synced 2024-11-25 11:19:50 +00:00
Fix query-arg escaping defect uncovered by proper testing.
This commit is contained in:
parent
c1349ba8b2
commit
5ae094d9be
1 changed files with 5 additions and 3 deletions
|
@ -18,8 +18,9 @@ import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from tornado import log
|
from tornado import escape, log
|
||||||
except ImportError:
|
except ImportError: # pragma no cover
|
||||||
|
escape = None
|
||||||
log = None
|
log = None
|
||||||
|
|
||||||
version_info = (1, 3, 0)
|
version_info = (1, 3, 0)
|
||||||
|
@ -148,7 +149,8 @@ def tornado_log_function(handler):
|
||||||
'method': handler.request.method,
|
'method': handler.request.method,
|
||||||
'path': handler.request.path,
|
'path': handler.request.path,
|
||||||
'protocol': handler.request.protocol,
|
'protocol': handler.request.protocol,
|
||||||
'query_args': handler.request.query_arguments,
|
'query_args': escape.recursive_unicode(
|
||||||
|
handler.request.query_arguments),
|
||||||
'remote_ip': handler.request.remote_ip,
|
'remote_ip': handler.request.remote_ip,
|
||||||
'status_code': status_code,
|
'status_code': status_code,
|
||||||
'environment': os.environ.get('ENVIRONMENT')})
|
'environment': os.environ.get('ENVIRONMENT')})
|
||||||
|
|
Loading…
Reference in a new issue