From 3c35d94011af3c46666c676b7098a30f4e427168 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 7 May 2022 13:01:49 +0200 Subject: 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 which produced a traceback previously. --- plugins/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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, -- cgit v1.2.3