]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lua: Lua applets must not fetch samples using http_txn
authorThierry FOURNIER <tfournier@arpalert.org>
Sun, 20 Dec 2015 17:43:03 +0000 (18:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Dec 2015 22:13:00 +0000 (23:13 +0100)
commitca98866bcf80fd13998adcacc0a8d7213714c974
tree9340993337dad9222be9b32d9f940a4e9bdf386f
parent7fa0549a2b7eaedd1a8bf9e13266b6535a9257fb
BUG/MEDIUM: lua: Lua applets must not fetch samples using http_txn

If a sample fetch needing http_txn is called from an HTTP Lua applet,
the result will be invalid and may even cause a crash because some HTTP
data can be forwarded and the HTTP txn is no longer valid.

Here the solution is to ensure that a fetch called from Lua never
needs http_txn. This is done thanks to a new flag HLUA_F_MAY_USE_HTTP
which indicates whether or not it is safe to call a fetch which needs
HTTP.

This fix needs to be backported to 1.6.
include/types/hlua.h
src/hlua.c