Software /
code /
prosody
Diff
plugins/mod_component.lua @ 13750:53c39fdb007f 13.0
mod_component: Don't return error reply for errors, fixes #1897
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Feb 2025 21:48:07 +0100 |
parent | 13213:50324f66ca2a |
line wrap: on
line diff
--- a/plugins/mod_component.lua Sat Feb 22 21:45:34 2025 +0100 +++ b/plugins/mod_component.lua Sat Feb 22 21:48:07 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