mod_firewall: Fix FORWARD action to include a 'from' address and depend on core_post_stanza
--- a/mod_firewall/actions.lib.lua Tue Feb 21 13:37:44 2017 +0000
+++ b/mod_firewall/actions.lib.lua Tue Feb 21 22:40:31 2017 +0000
@@ -157,11 +157,11 @@
function action_handlers.FORWARD(where)
local code = [[
- local newstanza = st.stanza("message", { to = %q }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" });
+ local newstanza = st.stanza("message", { to = %q, from = session.host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" });
local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza);
core_post_stanza(session, newstanza);
]];
- return code:format(where);
+ return code:format(where), { "core_post_stanza" };
end
function action_handlers.LOG(string)