Mercurial > prosody-hg
comparison 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 |
| parents | 50324f66ca2a |
| children |
comparison
equal
deleted
inserted
replaced
| 13749:08c2b7accd94 | 13750:53c39fdb007f |
|---|---|
| 237 elseif not from then | 237 elseif not from then |
| 238 stanza.attr.from = session.host; | 238 stanza.attr.from = session.host; |
| 239 end | 239 end |
| 240 if not stanza.attr.to then | 240 if not stanza.attr.to then |
| 241 session.log("warn", "Rejecting stanza with no 'to' address"); | 241 session.log("warn", "Rejecting stanza with no 'to' address"); |
| 242 session.send(st.error_reply(stanza, "modify", "bad-request", "Components MUST specify a 'to' address on stanzas")); | 242 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |
| 243 session.send(st.error_reply(stanza, "modify", "bad-request", "Components MUST specify a 'to' address on stanzas")); | |
| 244 end | |
| 243 return; | 245 return; |
| 244 end | 246 end |
| 245 end | 247 end |
| 246 | 248 |
| 247 if stanza then | 249 if stanza then |
