]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: config: for word expansion, empty or non-existing are the same
authorWilly Tarreau <w@1wt.eu>
Mon, 10 Nov 2025 10:55:33 +0000 (11:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Nov 2025 10:59:35 +0000 (11:59 +0100)
commit137d5ba93f62ef6e36caedac229ae47f7ddef48b
tree8b9af6f7ae9e119030f4410be6116046e85d01cb
parentb26a6d50c617424004482c63a4863990ca837013
BUG/MEDIUM: config: for word expansion, empty or non-existing are the same

Amaury reported a case where "${FOO[*]}" still produces an empty field.
It happens if the variable is defined but does not contain any non-space
characters. The reason is that we special-case word expansion only on
non-existing vars. Let's change the ordering of operations so that word-
expanded vars always pretend the current arg is not an empty quote, so
that we don't make any difference between a non-existing var and an
empty one.

No backport is needed unless commit 1968731765 ("BUG/MEDIUM: config:
solve the empty argument problem again") is.
src/tools.c