Changeset

13556:d3649ae194ab

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.
author Kim Alvefur <zash@zash.se>
date Sun, 10 Nov 2024 15:10:26 +0100
parents 13555:42b98ee73ca8
children 13557:63492b6e7fb6
files plugins/mod_s2s.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s.lua	Sun Nov 10 15:06:00 2024 +0100
+++ b/plugins/mod_s2s.lua	Sun Nov 10 15:10:26 2024 +0100
@@ -227,7 +227,7 @@
 	-- 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