core.stanza_router: Handle s2s in more direction-agnostic way
authorKim Alvefur <zash@zash.se>
Sat, 07 Sep 2019 17:34:56 +0200
changeset 10249 88efdfb0a126
parent 10248 483cc47f15f8
child 10250 19d7a2e7b9c4
core.stanza_router: Handle s2s in more direction-agnostic way
core/stanza_router.lua
--- a/core/stanza_router.lua	Sat Sep 07 17:32:55 2019 +0200
+++ b/core/stanza_router.lua	Sat Sep 07 17:34:56 2019 +0200
@@ -111,8 +111,8 @@
 		stanza.attr.from = from;
 	end
 
-	if (origin.type == "s2sin" or origin.type == "c2s" or origin.type == "component") and xmlns == nil then
-		if origin.type == "s2sin" and not origin.dummy then
+	if (origin.type == "s2sin" or origin.type == "s2sout" or origin.type == "c2s" or origin.type == "component") and xmlns == nil then
+		if (origin.type == "s2sin" or origin.type == "s2sout") and not origin.dummy then
 			local host_status = origin.hosts[from_host];
 			if not host_status or not host_status.authed then -- remote server trying to impersonate some other server?
 				log("warn", "Received a stanza claiming to be from %s, over a stream authed for %s!", from_host, origin.from_host);