Mercurial > prosody-modules
diff mod_firewall/mod_firewall.lua @ 2464:01babf1caa4a
mod_firewall: Fix $<> expressions being truncated when compiled
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Jan 2017 18:04:59 +0000 |
parents | ef95853cf900 |
children | 3990b1bca308 |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Wed Jan 25 10:34:50 2017 +0100 +++ b/mod_firewall/mod_firewall.lua Thu Jan 26 18:04:59 2017 +0000 @@ -64,7 +64,7 @@ if expr:match("^@") then return "\"..(stanza.attr["..("%q"):format(expr:sub(2)).."] or "..("%q"):format(default)..")..\""; end - return "\"..(stanza:find("..("%q"):format(expr:sub(2, -2))..") or "..("%q"):format(default)..")..\""; + return "\"..(stanza:find("..("%q"):format(expr)..") or "..("%q"):format(default)..")..\""; end) :gsub("$$(%a+)", extra or {}) :gsub([[^""%.%.]], "")