diff options
author | Kim Alvefur <zash@zash.se> | 2022-05-07 13:01:49 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-05-07 13:01:49 +0200 |
commit | 3c35d94011af3c46666c676b7098a30f4e427168 (patch) | |
tree | d03c3c335faf4c8d84e2336b9f88a971e0055ac2 /plugins | |
parent | c9dc1c903a80649dadf2d56786266307c23d7b63 (diff) | |
download | prosody-3c35d94011af3c46666c676b7098a30f4e427168.tar.gz prosody-3c35d94011af3c46666c676b7098a30f4e427168.zip |
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_s2s.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua index 3afb73eb..7662be57 100644 --- a/plugins/mod_s2s.lua +++ b/plugins/mod_s2s.lua @@ -147,7 +147,7 @@ local function bounce_sendq(session, reason) 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, |