# HG changeset patch # User Matthew Wild # Date 1664299422 -3600 # Node ID bc491065c221cf7e50bd542e23ffb736b14e6579 # Parent 5f1120c284c5a36bdc8499a25e5028d1eadde5c1 mod_sasl2_bind2, mod_sasl2_sm: Remove bind2 wrapper element This was dropped from the spec. It's more consistent with SASL2. diff -r 5f1120c284c5 -r bc491065c221 mod_sasl2_bind2/mod_sasl2_bind2.lua --- a/mod_sasl2_bind2/mod_sasl2_bind2.lua Sat Sep 24 09:26:26 2022 +0100 +++ b/mod_sasl2_bind2/mod_sasl2_bind2.lua Tue Sep 27 18:23:42 2022 +0100 @@ -44,11 +44,9 @@ -- Enable inline features requested by the client local function enable_features(session, bind_request, bind_result) - local features = bind_request:get_child("features"); - if not features then return; end module:fire_event("enable-bind-features", { session = session; - features = features; + request = bind_request; result = bind_result; }); end @@ -92,16 +90,16 @@ end); module:hook("enable-bind-features", function (event) - local session, features = event.session, event.features; + local session, request = event.session, event.request; -- Carbons - if features:get_child("enable", "urn:xmpp:carbons:2") then + if request:get_child("enable", "urn:xmpp:carbons:2") then session.want_carbons = true; event.result:tag("enabled", { xmlns = "urn:xmpp:carbons:2" }):up(); end -- CSI - local csi_state_tag = features:child_with_ns("urn:xmpp:csi:0"); + local csi_state_tag = request:child_with_ns("urn:xmpp:csi:0"); if csi_state_tag then session.state = csi_state_tag.name; end diff -r 5f1120c284c5 -r bc491065c221 mod_sasl2_sm/mod_sasl2_sm.lua --- a/mod_sasl2_sm/mod_sasl2_sm.lua Sat Sep 24 09:26:26 2022 +0100 +++ b/mod_sasl2_sm/mod_sasl2_sm.lua Tue Sep 27 18:23:42 2022 +0100 @@ -57,7 +57,7 @@ end); module:hook("enable-bind-features", function (event) - local sm_enable = event.features:get_child("enable", xmlns_sm); + local sm_enable = event.request:get_child("enable", xmlns_sm); if not sm_enable then return; end local sm_result;