From e0977138831d70bd695ca2f69a98ca34fdfad3b7 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 10 Nov 2024 15:10:26 +0100 Subject: mod_s2s: Clone queued outgoing stanzas to prevent changes This clone call was lost in 902d25cd0557 Affects e.g. presence broadcasts, where the same stanza is sent many times while mutating the 'to' attribute. --- plugins/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua index 6177608b..8a402406 100644 --- a/plugins/mod_s2s.lua +++ b/plugins/mod_s2s.lua @@ -227,7 +227,7 @@ function route_to_new_session(event) -- Store in buffer host_session.bounce_sendq = bounce_sendq; host_session.sendq = queue.new(sendq_size); - host_session.sendq:push(stanza); + host_session.sendq:push(st.clone(stanza)); log("debug", "stanza [%s] queued until connection complete", stanza.name); -- FIXME Cleaner solution to passing extra data from resolvers to net.server -- This mt-clone allows resolvers to add extra data, currently used for DANE TLSA records -- cgit v1.2.3