aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-07 13:01:49 +0200
committerKim Alvefur <zash@zash.se>2022-05-07 13:01:49 +0200
commit3c35d94011af3c46666c676b7098a30f4e427168 (patch)
treed03c3c335faf4c8d84e2336b9f88a971e0055ac2 /plugins
parentc9dc1c903a80649dadf2d56786266307c23d7b63 (diff)
downloadprosody-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.lua2
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,