]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hlua: Only execute functions of HTTP class if the txn is HTTP ready
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Jul 2019 14:31:34 +0000 (16:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 29 Jul 2019 09:17:52 +0000 (11:17 +0200)
commit301eff8e215d5dc7130e1ebacd7cf8da09a4f643
tree9cac7277cd91acb7da088811157835b7378eccf0
parentbfab2dddad3ded87617d1e2db54761943d1eb32d
BUG/MINOR: hlua: Only execute functions of HTTP class if the txn is HTTP ready

The flag HLUA_TXN_HTTP_RDY was added in the previous commit to know when a
function is called for a channel with a valid HTTP message or not. Of course it
also depends on the calling direction. In this commit, we allow the execution of
functions of the HTTP class only if this flag is set.

Nobody seems to use them from an unsupported context (for instance, trying to
set an HTTP header from a tcp-request rule). But it remains a bug leading to
undefined behaviors or crashes.

This patch may be backported to all versions since the 1.6. It depends on the
commits "MINOR: hlua: Add a flag on the lua txn to know in which context it can
be used" and "MINOR: hlua: Don't set request analyzers on response channel for
lua actions".
src/hlua.c