MEDIUM: lua: Don't filter exported fetches and converters
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Aug 2020 08:32:28 +0000 (10:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2020 09:37:50 +0000 (11:37 +0200)
commit53f744116e82cf553097acc13ba854b16174bc52
treec30d624322bebff6db055e1495144dded3dfca93
parentd0ae3913099bb08ab3b7c7ee46656569f6850595
MEDIUM: lua: Don't filter exported fetches and converters

Thanks to previous commits, it is now safe to use from lua the sample fetches
and sample converters that convert arguments, especially the strings
(ARGT_STR). So now, there are all exported to the lua. They was filtered on the
validation functions. Only fetches without validation functions or with val_hdr
or val_payload_lv functions were exported, and converters without validation
functions.

This patch depends on following commits :

  * aec27ef44 "BUG/MINOR: lua: Duplicate lua strings in sample fetches/converters arg array"
  * fdea1b631 "MINOR: hlua: Don't needlessly copy lua strings in trash during args validation"

It must be backported as far as 2.1 because the date() and http_date()
converters are no longer exported because of the filter on the validation
function, since the commit ae6f125c7 ("MINOR: sample: add us/ms support to
date/http_date)".

(cherry picked from commit 05e2d7744189e52dbd1625a168d6f8888b9658b8)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 4cf32912f80ca2d45eeb5d2dfdb5339a425f401a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/hlua.c