Software /
code /
prosody
Diff
plugins/mod_s2s.lua @ 12493:e9ea5c88def0
mod_s2s: Don't bounce queued error stanzas (thanks Martin)
The check for the type attr was lost in 11765f0605ec leading to attempts
to create error replies for error stanzas, which util.stanza rejects.
Tested by sending
<message to="reject.badxmpp.eu" type="error"><error/></message>
which produced a traceback previously.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 07 May 2022 13:01:49 +0200 |
parent | 12480:7e9ebdc75ce4 |
child | 12494:65316782862f |
line wrap: on
line diff
--- a/plugins/mod_s2s.lua Fri May 06 17:09:06 2022 +0100 +++ b/plugins/mod_s2s.lua Sat May 07 13:01:49 2022 +0200 @@ -147,7 +147,7 @@ reason_text = reason; end for i, stanza in ipairs(sendq) do - if not stanza.attr.xmlns and bouncy_stanzas[stanza.name] then + if not stanza.attr.xmlns and bouncy_stanzas[stanza.name] and stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then local reply = st.error_reply( stanza, error_type,