BUG/MINOR: vars: fix set-var/unset-var exclusivity in the keyword parser
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Sep 2021 16:46:22 +0000 (18:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Sep 2021 14:29:26 +0000 (16:29 +0200)
commit9f3d5f82fa1c7ed2dce161cadd71624ac4c012ce
treec4d5d9a2cf8eb932a76b93ea30a773681e4d225e
parent4b9a7c08502f6b0fd33870776467ade076ac801f
BUG/MINOR: vars: fix set-var/unset-var exclusivity in the keyword parser

The parser checks first for "set-var" then "unset-var" from the updated
offset instead of testing it only when the other one fails, so it
validates this rule as "unset-var":

    http-request set-varunset-var(proc.a)

This should be backported everywhere relevant, though it's mostly harmless
as it's unlikely that some users are purposely writing this in their conf!

(cherry picked from commit 2819210a8328ff60505e499acf9f8bc323bec840)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit f6bda6191520885fc3af06c3dec8a74e56d46cbd)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/vars.c