mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-07 19:02:35 -08:00
server doesn't allow an empty user name
This commit is contained in:
@@ -160,7 +160,9 @@ ResponseCode Server_ProtocolHandler::cmdPing(Command_Ping * /*cmd*/)
|
|||||||
|
|
||||||
ResponseCode Server_ProtocolHandler::cmdLogin(Command_Login *cmd)
|
ResponseCode Server_ProtocolHandler::cmdLogin(Command_Login *cmd)
|
||||||
{
|
{
|
||||||
QString userName = cmd->getUsername();
|
QString userName = cmd->getUsername().simplified();
|
||||||
|
if (userName.isEmpty())
|
||||||
|
return RespContextError;
|
||||||
authState = server->checkUserPassword(userName, cmd->getPassword());
|
authState = server->checkUserPassword(userName, cmd->getPassword());
|
||||||
if (authState == PasswordWrong)
|
if (authState == PasswordWrong)
|
||||||
return RespWrongPassword;
|
return RespWrongPassword;
|
||||||
|
|||||||
Reference in New Issue
Block a user