Sanitize script output in logger

This commit is contained in:
JonnyWong16 2017-12-31 14:41:32 -08:00
parent 90c587e6e1
commit 79581fb83e

View file

@ -2783,12 +2783,12 @@ class SCRIPTS(Notifier):
return False return False
if error: if error:
err = '\n '.join([l for l in error.splitlines()]) err = '\n '.join([helpers.sanitize(l) for l in error.splitlines()])
logger.error(u"Tautulli Notifiers :: Script error: \n %s" % err) logger.error(u"Tautulli Notifiers :: Script error: \n %s" % err)
return False return False
if output: if output:
out = '\n '.join([l for l in output.splitlines()]) out = '\n '.join([helpers.sanitize(l) for l in output.splitlines()])
logger.debug(u"Tautulli Notifiers :: Script returned: \n %s" % out) logger.debug(u"Tautulli Notifiers :: Script returned: \n %s" % out)
if not self.script_killed: if not self.script_killed: