diff mod_firewall/actions.lib.lua @ 2551:9392f45b0364

mod_firewall: Fix FORWARD to send from current module's host
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Feb 2017 14:01:12 +0000
parents cca9de97526b
children 2b533a7b5236
line wrap: on
line diff
--- a/mod_firewall/actions.lib.lua	Thu Feb 23 14:00:43 2017 +0000
+++ b/mod_firewall/actions.lib.lua	Thu Feb 23 14:01:12 2017 +0000
@@ -157,11 +157,11 @@
 
 function action_handlers.FORWARD(where)
 	local code = [[
-		local newstanza = st.stanza("message", { to = %q, from = session.host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" });
+		local newstanza = st.stanza("message", { to = %q, from = current_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), { "core_post_stanza" };
+	return code:format(where), { "core_post_stanza", "current_host" };
 end
 
 function action_handlers.LOG(string)