Changeset

2542:cca9de97526b

mod_firewall: Fix FORWARD action to include a 'from' address and depend on core_post_stanza
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Feb 2017 22:40:31 +0000
parents 2541:76f03d514b13
children 2543:3c16f0a8d66c
files mod_firewall/actions.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)