BUG/MINOR: rules: Forbid captures in defaults section if used by a backend
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 25 Apr 2022 12:24:56 +0000 (14:24 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 25 Apr 2022 13:05:04 +0000 (15:05 +0200)
commit6c10f5c7bcc4da8c782ec09c200dd485e133c403
treea0cdb73ce81863b6f6e89f967c0d979f4ccf6245
parent7586bef6d7fc866659aff9017a644d7f48ba16ce
BUG/MINOR: rules: Forbid captures in defaults section if used by a backend

Captures must only be defined in proxies with the frontend capabilities or
in defaults sections used by proxies with the frontend capabilities. Thus,
an extra check is added to be sure a defaults section defining a capture
will never be references by a backend.

Note that in this case, only named captures in "tcp-request content" or
"http-request" rules are possible. It is not possible in a defaults section
to decalre a capture slot. Not yet at least.

This patch must be backported to 2.5. It is releated to issue #1674.
src/cfgparse-listen.c