Comparison

mod_sasl2/mod_sasl2.lua @ 5063:53145c6b6b0b

mod_sasl2: Clear sasl_handler on final success
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 Oct 2022 22:48:28 +0100
parent 5049:e89aad13a52a
child 5067:54c6b4595f86
comparison
equal deleted inserted replaced
5062:38a0e3621181 5063:53145c6b6b0b
170 -- The gap here is to allow modules to do stuff to the stream after the stanza 170 -- The gap here is to allow modules to do stuff to the stream after the stanza
171 -- is sent, but before we proceed with anything else. This is expected to be 171 -- is sent, but before we proceed with anything else. This is expected to be
172 -- a common pattern with SASL2, which allows atomic negotiation of a bunch of 172 -- a common pattern with SASL2, which allows atomic negotiation of a bunch of
173 -- stream features. 173 -- stream features.
174 module:hook("sasl2/c2s/success", function (event) --luacheck: ignore 212/event 174 module:hook("sasl2/c2s/success", function (event) --luacheck: ignore 212/event
175 event.session.sasl_handler = nil;
175 return true; 176 return true;
176 end, -2000); 177 end, -2000);
177 178
178 local function process_cdata(session, cdata) 179 local function process_cdata(session, cdata)
179 if cdata then 180 if cdata then