Changeset

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
parents 12492:a44c328028ad
children 12494:65316782862f
files plugins/mod_s2s.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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,