aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2025-02-22 21:48:07 +0100
committerKim Alvefur <zash@zash.se>2025-02-22 21:48:07 +0100
commite52cc0126df37947718c18b590b682943ec6da16 (patch)
tree08af9e145183053e338e954390d8b3854e6ec30f
parent68296b6a8e6faa6ff076f634960d21adf5f17ada (diff)
downloadprosody-e52cc0126df37947718c18b590b682943ec6da16.tar.gz
prosody-e52cc0126df37947718c18b590b682943ec6da16.zip
mod_component: Don't return error reply for errors, fixes #1897
-rw-r--r--plugins/mod_component.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 86ceb980..51c73235 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -239,7 +239,9 @@ function stream_callbacks.handlestanza(session, stanza)
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