Mercurial > prosody-modules
changeset 2086:de6b95d5e01b
mod_firewall: tostring() the results of meta expressions
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 16 Mar 2016 11:09:46 +0000 |
parents | 8cb8004091f8 |
children | e48dbb640408 f5d78bc016a6 |
files | mod_firewall/actions.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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