mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Merge branch 'insp3' into master.
This commit is contained in:
commit
c3d35d736e
@ -267,6 +267,12 @@ public:
|
||||
return this->state;
|
||||
}
|
||||
|
||||
void Abort()
|
||||
{
|
||||
this->state = SASL_DONE;
|
||||
this->result = SASL_ABORT;
|
||||
}
|
||||
|
||||
bool SendClientMessage(const std::vector<std::string>& parameters)
|
||||
{
|
||||
if (this->state != SASL_COMM)
|
||||
@ -276,15 +282,14 @@ public:
|
||||
|
||||
if (parameters[0].c_str()[0] == '*')
|
||||
{
|
||||
this->state = SASL_DONE;
|
||||
this->result = SASL_ABORT;
|
||||
this->Abort();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AnnounceState(void)
|
||||
void AnnounceState()
|
||||
{
|
||||
if (this->state_announced)
|
||||
return;
|
||||
@ -437,6 +442,21 @@ public:
|
||||
servertracker.Reset();
|
||||
}
|
||||
|
||||
void OnUserConnect(LocalUser* user) override
|
||||
{
|
||||
// If the client completes registration (with CAP END, NICK, USER and
|
||||
// any other necessary messages) while the SASL authentication is still
|
||||
// in progress, the server SHOULD abort it and send a 906 numeric, then
|
||||
// register the client without authentication.
|
||||
SaslAuthenticator* saslauth = authExt.Get(user);
|
||||
if (saslauth)
|
||||
{
|
||||
saslauth->Abort();
|
||||
saslauth->AnnounceState();
|
||||
authExt.Unset(user);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDecodeMetaData(Extensible* target, const std::string& extname, const std::string& extdata) override
|
||||
{
|
||||
if ((!target) && (extname == "saslmechlist"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user