Diff

plugins/mod_component.lua @ 13751:7c98981d3fe9

Merge 13.0->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 22 Feb 2025 21:49:59 +0100
parent 13750:53c39fdb007f
line wrap: on
line diff
--- a/plugins/mod_component.lua	Sat Feb 22 09:41:29 2025 +0000
+++ b/plugins/mod_component.lua	Sat Feb 22 21:49:59 2025 +0100
@@ -239,7 +239,9 @@
 		end
 		if not stanza.attr.to then
 			session.log("warn", "Rejecting stanza with no 'to' address");
-			session.send(st.error_reply(stanza, "modify", "bad-request", "Components MUST specify a 'to' address on stanzas"));
+			if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
+				session.send(st.error_reply(stanza, "modify", "bad-request", "Components MUST specify a 'to' address on stanzas"));
+			end
 			return;
 		end
 	end