# HG changeset patch # User Kim Alvefur # Date 1481644636 -3600 # Node ID 07d7036040eef65e8d3d9845323515280bdbcb57 # Parent 97b4229982f56c9fc3662a80d0070cc3997560ed mod_firewall: Insert semicolons after some statements to prevent ambiguous syntax in output (fixes #797) diff -r 97b4229982f5 -r 07d7036040ee mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Sun Dec 04 10:19:07 2016 +0100 +++ b/mod_firewall/actions.lib.lua Tue Dec 13 16:57:16 2016 +0100 @@ -114,7 +114,7 @@ local function route_modify(make_new, to, drop) local reroute, deps = "session.send(newstanza)", { "st" }; if to then - reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza)"):format(to); + reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza);"):format(to); deps[#deps+1] = "core_post_stanza"; end return ([[local newstanza = st.%s; %s;%s]]) @@ -158,7 +158,7 @@ function action_handlers.LOG(string) local level = string:match("^%[(%a+)%]") or "info"; string = string:gsub("^%[%a+%] ?", ""); - return meta(("(session.log or log)(%q, %q)"):format(level, string)); + return meta(("(session.log or log)(%q, %q);"):format(level, string)); end function action_handlers.RULEDEP(dep) diff -r 97b4229982f5 -r 07d7036040ee mod_firewall/mod_firewall.lua --- a/mod_firewall/mod_firewall.lua Sun Dec 04 10:19:07 2016 +0100 +++ b/mod_firewall/mod_firewall.lua Tue Dec 13 16:57:16 2016 +0100 @@ -93,7 +93,7 @@ to = { local_code = [[local to = stanza.attr.to or jid_bare(session.full_jid);]]; depends = { "jid_bare" } }; from = { local_code = [[local from = stanza.attr.from;]] }; type = { local_code = [[local type = stanza.attr.type;]] }; - name = { local_code = [[local name = stanza.name]] }; + name = { local_code = [[local name = stanza.name;]] }; split_to = { -- The stanza's split to address depends = { "jid_split", "to" }; local_code = [[local to_node, to_host, to_resource = jid_split(to);]];