Comparison

plugins/mod_s2s.lua @ 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
parent 13555:42b98ee73ca8
child 13557:63492b6e7fb6
comparison
equal deleted inserted replaced
13555:42b98ee73ca8 13556:d3649ae194ab
225 host_session.version = 1; 225 host_session.version = 1;
226 226
227 -- Store in buffer 227 -- Store in buffer
228 host_session.bounce_sendq = bounce_sendq; 228 host_session.bounce_sendq = bounce_sendq;
229 host_session.sendq = queue.new(sendq_size); 229 host_session.sendq = queue.new(sendq_size);
230 host_session.sendq:push(stanza); 230 host_session.sendq:push(st.clone(stanza));
231 log("debug", "stanza [%s] queued until connection complete", stanza.name); 231 log("debug", "stanza [%s] queued until connection complete", stanza.name);
232 -- FIXME Cleaner solution to passing extra data from resolvers to net.server 232 -- FIXME Cleaner solution to passing extra data from resolvers to net.server
233 -- This mt-clone allows resolvers to add extra data, currently used for DANE TLSA records 233 -- This mt-clone allows resolvers to add extra data, currently used for DANE TLSA records
234 module:context(from_host):fire_event("s2sout-created", { session = host_session }); 234 module:context(from_host):fire_event("s2sout-created", { session = host_session });
235 local xmpp_extra = setmetatable({}, s2s_service_options_mt); 235 local xmpp_extra = setmetatable({}, s2s_service_options_mt);