BUG/MINOR: config: Stopped parsing upon unmatched environment variables
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 30 Nov 2023 08:26:05 +0000 (09:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Nov 2023 15:48:41 +0000 (16:48 +0100)
commitff8db5a85d60b21a711f8707791119adbbcffadc
treea9e1c110b1b0b3266d9bde4a0e0ef10cf89cfa81
parentfa0a304f350e75030daf9d52220c500cd1d5a004
BUG/MINOR: config: Stopped parsing upon unmatched environment variables

When an environment variable could not be matched by getenv(), the
current character to be parsed by parse_line() from <in> variable
is the trailing double quotes. If nothing is done in such a case,
this character is skipped by parse_line(), then the following spaces
are parsed as an empty argument.

To fix this, skip the double quotes character and the following spaces
to make <in> variable point to the next argument to be parsed.

Thank you to @sigint2 for having reported this issue in GH #2367.

Must be backported as far as 2.4.
src/tools.c