]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: vars: Be sure to have a session to get checks variables
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Jun 2021 09:48:42 +0000 (11:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Jun 2021 09:55:14 +0000 (11:55 +0200)
commitc4439f71b0515c143c5bfc8aa5102b2be7cba7b6
treee9d8f226d19096b161e906843e6a4986e13af10c
parente9106d69cb1bc0550ca2f6500ed9a3bcc75d21d6
BUG/MINOR: vars: Be sure to have a session to get checks variables

It is now possible to get any variables from the cli. Concretely, only
variables in the PROC scope can be retrieved because there is neither stream
nor session defined. But, nothing forbids anyone to try to get a variable in
any scope. No value will be found, but it is allowed. Thus, we must be sure
to not rely on an undefined session or stream in that case. Especially, the
session must be tested before retrieving variables in CHECK scope.

This patch should fix the issue #1249. It must be backported to 2.4.
src/vars.c