[PATCH 0/1] Re: BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-22 Thread Tim Duesterhus
Hi attached comes a reg-test that can be used to verify that the behaviour that Patrick described actually exists. I cannot comment on whether txn:get_priv() is working correctly or not, this is up to you. The test only checks that the value is reset for the second request. Best regards Tim Düst

Re: BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-22 Thread Patrick Hemmer
On 2018/8/22 05:16, Thierry Fournier wrote: > Hi Patrick, > > Could you retry adding the keyword “local” before data. Unfortunately, > by default, Lua variables are global. > Makes no difference, still get the same result. I don't think it would do anything anyway as the `txn:get_priv()` will sti

Re: BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-22 Thread Thierry Fournier
Hi Patrick, Could you retry adding the keyword “local” before data. Unfortunately, by default, Lua variables are global. > core.register_action("test", { "http-req" }, function(txn) > local data = txn:get_priv() > if not data then > data = 0 > end >

Re: BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-22 Thread Willy Tarreau
CCing Thierry. On Tue, Aug 21, 2018 at 11:57:52PM -0400, Patrick Hemmer wrote: > There is a bug in the current stable haproxy (1.8.13) where the LUA > function txn:get_priv() is returning data stored from other > transactions. This was discovered as we have code that triggers on > certain requests

BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-21 Thread Patrick Hemmer
There is a bug in the current stable haproxy (1.8.13) where the LUA function txn:get_priv() is returning data stored from other transactions. This was discovered as we have code that triggers on certain requests, and it was triggering on requests it should not have been. You can reproduce with thi