# HG changeset patch # User Matthew Wild # Date 1661682321 -3600 # Node ID f62b091b1c81c92e6059ba4569155ae6a46de2f6 # Parent 6a36dae4a88d55b62a48d1aaf130ee8b7cadd45d mod_sasl2: Eventually return true from success handler ...while allowing other handlers to run in the priority range -1000 to -2000. diff -r 6a36dae4a88d -r f62b091b1c81 mod_sasl2/mod_sasl2.lua --- a/mod_sasl2/mod_sasl2.lua Sun Aug 28 11:18:10 2022 +0100 +++ b/mod_sasl2/mod_sasl2.lua Sun Aug 28 11:25:21 2022 +0100 @@ -105,6 +105,14 @@ session.send(features); end, -1000); +-- The gap here is to allow modules to do stuff to the stream after the stanza +-- is sent, but before we proceed with anything else. This is expected to be +-- a common pattern with SASL2, which allows atomic negotiation of a bunch of +-- stream features. +module:hook("sasl2/c2s/success", function (event) --luacheck: ignore 212/event + return true; +end, -2000); + local function process_cdata(session, cdata) if cdata then cdata = base64.decode(cdata);