mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 12:10:06 -03:30
properly escape URL paths and querystrings for paths in logging settings
This commit is contained in:
committed by
Christian Adams
parent
b0db2b7bec
commit
bb5136cdae
@@ -53,7 +53,10 @@ def construct_rsyslog_conf_template(settings=settings):
|
|||||||
'healthchecktimeout="20000"',
|
'healthchecktimeout="20000"',
|
||||||
]
|
]
|
||||||
if parsed.path:
|
if parsed.path:
|
||||||
params.append(f'restpath="{parsed.path[1:]}"')
|
path = urlparse.quote(parsed.path[1:])
|
||||||
|
if parsed.query:
|
||||||
|
path = f'{path}?{urlparse.quote(parsed.query)}'
|
||||||
|
params.append(f'restpath="{path}"')
|
||||||
username = getattr(settings, 'LOG_AGGREGATOR_USERNAME', '')
|
username = getattr(settings, 'LOG_AGGREGATOR_USERNAME', '')
|
||||||
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
|
password = getattr(settings, 'LOG_AGGREGATOR_PASSWORD', '')
|
||||||
if username:
|
if username:
|
||||||
|
|||||||
Reference in New Issue
Block a user