Software /
code /
prosody-modules
Changeset
5021:f62b091b1c81
mod_sasl2: Eventually return true from success handler
...while allowing other handlers to run in the priority range -1000 to -2000.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 28 Aug 2022 11:25:21 +0100 |
parents | 5020:6a36dae4a88d |
children | 5022:97d34d520cfa |
files | mod_sasl2/mod_sasl2.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);