If the user hasnt sent CAP REQ sasl, do nothing if AUTHENTICATE is sent by that user

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9154 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2008-03-21 20:24:15 +00:00
parent cd8d817ac4
commit c798703113

View File

@ -29,6 +29,9 @@ class CommandAuthenticate : public Command
CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
if (user->registered != REG_ALL)
{
/* Only act if theyve enabled CAP REQ sasl */
if (user->GetExt("sasl"))
{
/* Only allow AUTHENTICATE on unregistered clients */
std::deque<std::string> params;
@ -42,6 +45,7 @@ class CommandAuthenticate : public Command
Event e((char*)&params, Creator, "send_encap");
e.Send(ServerInstance);
}
}
return CMD_FAILURE;
}
};