]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: map: split "add map/acl" payload keys on line breaks
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 18 Nov 2026 14:23:21 +0000 (15:23 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 18 Nov 2026 14:22:21 +0000 (15:22 +0100)
commitbd685d941d2531e2e635ea1ce602273b63f50e3c
treea38dfd139bfce2394297dcd6a710ff61c5d8aa4d
parent691e22fbbdbf8c40d14ab298ade1a6b2f4f44b79
BUG/MINOR: map: split "add map/acl" payload keys on line breaks

The payload of "add map" and "add acl" contains one entry per line, but
the key was only split on spaces and tabs. A map line without a value
was thus merged with the next line into a single bogus entry instead of
being reported as an error, as is done for the last line. For "add acl",
whose patterns contain no space, all the lines were merged into a single
pattern, and the parser then stepped past the end of the payload, where
it only reads the payload terminator line.

Let's also stop the key on line breaks, and consider that a line without
a space or tab after the key has no value.

This was introduced in 1.9 by commit 25650ce51 ("MINOR: map: Add payload
support to "add map"") and may be backported to all stable branches.
src/map.c