BUG/MINOR: sample: always check converters' arguments
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2019 09:25:29 +0000 (10:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Dec 2019 08:17:15 +0000 (09:17 +0100)
commit4a25605ab4475130b56e9b25d3ce1d071b796e2a
treef0bb030b02ccaba5f538eb93f8d7951a01e4fb75
parenta253ebd58cbe7c27c65f2f3aa1d6624f930a9090
BUG/MINOR: sample: always check converters' arguments

In 1.5-dev20, sample-fetch arguments parsing was addresse by commit
689a1df0a1 ("BUG/MEDIUM: sample: simplify and fix the argument parsing").
The issue was that argument checks were not run for sample-fetches if
parenthesis were not present. Surprisingly, the fix was mde only for
sample-fetches and not for converters which suffer from the exact same
problem. There are even a few comments in the code mentioning that some
argument validation functions are not called when arguments are missing.

This fix applies the exact same method as the one above. The impact of
this bug is limited because over the years the code has learned to work
around this issue instead of fixing it.

This may be backported to all maintained versions.

(cherry picked from commit 46dfd78cbf2591ab9cd2d8e30046e811f4179f7b)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/sample.c