# HG changeset patch # User Matthew Wild # Date 1458126586 0 # Node ID de6b95d5e01b357adb1595f2b643d9b1d6412fab # Parent 8cb8004091f855471de7de747028e3903a10f845 mod_firewall: tostring() the results of meta expressions diff -r 8cb8004091f8 -r de6b95d5e01b mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Wed Mar 16 11:42:40 2016 +0100 +++ b/mod_firewall/actions.lib.lua Wed Mar 16 11:09:46 2016 +0000 @@ -3,7 +3,7 @@ -- Run code through this to allow strings to contain code. e.g.: LOG=Received: $(stanza:top_tag()) local function meta(s, extra) - return (s:gsub("$(%b())", [["..%1.."]]) + return (s:gsub("$(%b())", [["..tostring(%1).."]]) :gsub("$(%b<>)", [["..stanza:find("%1").."]]) :gsub("$$(%a+)", extra or {})); end