]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: config: now reject configs with empty arguments
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Jun 2025 06:24:28 +0000 (08:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Nov 2025 18:57:44 +0000 (19:57 +0100)
commitd9d0721bc9130dbe236392d57666e7ec42141a98
tree362d0ef2cb57f3c0983bb51d1ef5f87d29198e2b
parent1968731765adfdd311c56f8bcbc718680ac3f23a
MEDIUM: config: now reject configs with empty arguments

As prepared during 3.2, we must error on empty arguments because they
mark the end of the line and cause subsequent arguments to be silently
ignored. It was too late in 3.2 to turn that into an error so it's a
warning, but for 3.3 it needed to be an alert.

This patch does that. It doesn't instantly break, instead it counts
one fatal error per violating line. This allows to emit several errors
at once, which can often be caused by the same variable being missed,
or a group of variables sharing a same misspelled prefix for example.
Tests show that it helps locate them better. It also explains what to
look for in the config manual for help with variables expansion.
src/cfgparse.c