From 94fbbe9ac5c613032d21eabec4d8a67a75397004 Mon Sep 17 00:00:00 2001 From: lotodore Date: Mon, 15 Oct 2007 08:35:56 +0000 Subject: [PATCH] Disallow space as first char of the player name. --- src/net/common/serverlobbythread.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index bed37461..40b2a517 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -377,6 +377,7 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const NetPacketIn // However, some disallowed names are checked only here. if (initData.playerName.empty() || initData.playerName.size() > MAX_NAME_SIZE || initData.playerName[0] == '#' + || initData.playerName[0] == ' ' || initData.playerName.substr(0, sizeof(SERVER_COMPUTER_PLAYER_NAME) - 1) == SERVER_COMPUTER_PLAYER_NAME) { SessionError(session, ERR_NET_INVALID_PLAYER_NAME);