summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2018-12-20 19:05:08 +0100
committerAlexander Færøy <ahf@torproject.org>2018-12-20 19:05:50 +0100
commitab0d7d2dd470a447535eaf7c35bd4877c43bce26 (patch)
treef7eecdad050650a7d6f0b7d22080f8e72572e422 /src/feature
parente2c36b9ca064580208ac0976aaad28f08f3a744b (diff)
downloadtor-ab0d7d2dd470a447535eaf7c35bd4877c43bce26.tar.gz
tor-ab0d7d2dd470a447535eaf7c35bd4877c43bce26.zip
Escape the PT K/V data before sending it to the logger.
See: https://bugs.torproject.org/28846
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/client/transports.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index 45dbd0c888..8a8bcd9f7f 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -1175,14 +1175,14 @@ parse_log_line(const char *line, managed_proxy_t *mp)
/* Check if we got a message. */
if (! message) {
log_warn(LD_PT, "Managed proxy \"%s\" wrote a LOG line without "
- "MESSAGE: %s", mp->argv[0], data);
+ "MESSAGE: %s", mp->argv[0], escaped(data));
goto done;
}
/* Check if severity is there and whether it's valid. */
if (! severity) {
log_warn(LD_PT, "Managed proxy \"%s\" wrote a LOG line without "
- "SEVERITY: %s", mp->argv[0], data);
+ "SEVERITY: %s", mp->argv[0], escaped(data));
goto done;
}
@@ -1232,7 +1232,7 @@ parse_status_line(const char *line, managed_proxy_t *mp)
if (! values) {
log_warn(LD_PT, "Managed proxy \"%s\" wrote an invalid "
- "STATUS message: %s", mp->argv[0], data);
+ "STATUS message: %s", mp->argv[0], escaped(data));
goto done;
}
@@ -1242,7 +1242,7 @@ parse_status_line(const char *line, managed_proxy_t *mp)
if (! type) {
log_warn(LD_PT, "Managed proxy \"%s\" wrote a STATUS line without "
- "TYPE: %s", mp->argv[0], data);
+ "TYPE: %s", mp->argv[0], escaped(data));
goto done;
}