]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: log: don't let an LF in a forwarded message create new events
authorGihyeon Ryu <rlgusryu@gmail.com>
Wed, 11 Nov 2026 10:00:12 +0000 (10:00 +0000)
committerOlivier Houchard <cognet@ci0.org>
Fri, 13 Nov 2026 15:55:27 +0000 (16:55 +0100)
commitfdfd607e84732539d67935f0e7babf092177e251
treedd80881e4d296e6c8600905b777adee405ef3fa0
parent9a17ef363976ba9a737795195e391a24f5dd8456
BUG/MINOR: log: don't let an LF in a forwarded message create new events

A message received by a log-forward section over UDP or over TCP with
octet counting may contain CR or LF bytes. They are forwarded as is to
line-based outputs (rings, tcp@ servers, stdout/stderr), where each LF
starts a new event. A sender can then forge complete syslog lines with
any host name and program, which also defeats "option host".

syslog_process_message() now replaces every CR and LF but the trailing
ones with a space before parsing, so each received message gives one
line.

This should be backported to all stable branches.
src/log.c