mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Reject more invalid usernames from clients.
Specifically this should cover people connecting with a username of "\u200C"
This commit is contained in:
parent
ba5669652c
commit
af09d0d294
8 changed files with 33 additions and 7 deletions
|
|
@ -114,7 +114,7 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
|||
QWriteLocker locker(&clientsLock);
|
||||
|
||||
AuthenticationResult authState = databaseInterface->checkUserPassword(session, name, password, reasonStr, secondsLeft);
|
||||
if ((authState == NotLoggedIn) || (authState == UserIsBanned))
|
||||
if ((authState == NotLoggedIn) || (authState == UserIsBanned || authState == UsernameInvalid))
|
||||
return authState;
|
||||
|
||||
ServerInfo_User data = databaseInterface->getUserData(name, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue