]> git.kaiwu.me - haproxy.git/commit
Revert "BUG/MINOR: config: Stopped parsing upon unmatched environment variables"
authorWilly Tarreau <w@1wt.eu>
Tue, 24 Jun 2025 16:18:18 +0000 (18:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 24 Jun 2025 16:22:15 +0000 (18:22 +0200)
commit4e20f786ba08d3e1c8c65862a5e5416168f09b74
tree845cc1b61aa473f39f1e11ff046baf5296c4725e
parent5694a9874436f4ed229cdb2ce3c8b30c9fdd4a3f
Revert "BUG/MINOR: config: Stopped parsing upon unmatched environment variables"

This reverts commit ff8db5a85d60b21a711f8707791119adbbcffadc.

As explained in commit #2367, finally the fix above was incorrect because
it causes other trouble such as this:

     log "192.168.100.${NODE}" "local0"

being resolved to this:

     log 192.168.100.local0

when NODE does not exist due to the loss of the spaces. In fact, while none
of us was well aware of this, when the user had:

     server app 127.0.0.1:80 "${NO_CHECK}" weight 123

in fact they should have written it this way:

     server app 127.0.0.1:80 "${NO_CHECK[*]}" weight 123

so that the variable is expanded to zero, one or multiple words, leaving
no empty arg (like in shell). This is supported since 2.3 with commit
fa41cb6 so the right fix is in the config, let's revert the fix.

This should be backported to *some* versions, but the risk that some
configs were altered to rely on the broken fix is not null. At least
recent LTS should be reverted.
src/tools.c