Changeset

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 2550:19a182651a9b
children 2552:18b6a55dd5d6
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	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)