]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: arg: don't reject missing optional args
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Feb 2020 15:41:29 +0000 (16:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Feb 2020 15:41:29 +0000 (16:41 +0100)
commit77e463f729de676ec3343ed3318a2cfa5d3a6a8b
tree954493c8ecc16a7788639c75b46c2ccfe8aefb1d
parent493d9dc6bac2c28a48382bcc240cd787447a909b
BUG/MINOR: arg: don't reject missing optional args

Commit 80b53ffb1c ("MEDIUM: arg: make make_arg_list() stop after its
own arguments") changed the way we detect the empty list because we
cannot stop by looking up the closing parenthesis anymore, thus for
the first missing arg we have to enter the parsing loop again. And
there, finding an empty arg means we go to the empty_err label, where
it was not initially planned to handle this condition. This results
in %[date()] to fail while %[date] works. Let's simply check if we've
reached the minimally supported args there (it used to be done during
the function entry).

Thanks to Jérôme for reporting this issue. No backport is needed,
this is 2.2-dev2+ only.
src/arg.c