]> jfr.im git - irc/atheme/atheme.git/commit
saslserv/main: Preserve pending login on abort
authorEd Kellett <redacted>
Sun, 17 Oct 2021 17:01:11 +0000 (18:01 +0100)
committerEd Kellett <redacted>
Sun, 17 Oct 2021 22:40:29 +0000 (23:40 +0100)
commitceb0235695e6736ce2abe86d0fe665be9e0f283c
tree352be68715ee9bfa2297260e6a6d23c79aaddead
parent4e664c75d0b280a052eb8b5e81aa41944e593c52
saslserv/main: Preserve pending login on abort

The previous patch made SaslServ aware of pending logins (i.e. SASL
sessions which have succeeded and generated a SVSLOGIN). This one
ensures that aborting a SASL authentication attempt does not destroy
that information: if you successfully authenticate as user A, then begin
and abort another authentication attempt as user B, you will log in as
user A.

This is only relevant in the pre-registration case, when SASL logins
cannot be actioned immediately. It's also necessary to avoid a desync in
this case: if we have already sent a SVSLOGIN for a login, the user is
going to be informed that they've logged in, and the ircd is going treat
them as though they're logged in. Other solutions are possible, but I
think the cleanest one is to action the last SVSLOGIN we sent, mirroring
their effect ircd-side.
modules/saslserv/main.c