]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cli: cli_snd_buf: preserve \r\n for payload lines
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 12 Dec 2024 18:38:38 +0000 (19:38 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 13 Dec 2024 17:13:42 +0000 (18:13 +0100)
commitd60c893991699af1103bcdcd33c915885c056559
treeb17861438d30387c2b84f7706146b384cb50dd53
parent178109f608ae1e446d9ea898bf5c83e4e8313bb5
BUG/MINOR: cli: cli_snd_buf: preserve \r\n for payload lines

cli_snd_buf() analyzez input line by line. Before this patch it has always
scanned a given line for the presence of '\r' followed by '\n'.

This is only needed for strings, that contain the commands itself like
"show ssl cert\n", "set ssl cert test.pem <<\n".

In case of strings, which contain the command's payload, like
"-----BEGIN CERTIFICATE-----\r\n", '\r\n' should be preserved
as is.

This patch fixes the GitHub issue #2818.

This patch should be backported in v3.1 and in v3.0.
src/cli.c