From 804d85c7da2a436ad90361cb9565c6a50f37fbef Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Sun, 22 Sep 2024 16:36:26 +0200 Subject: [PATCH 1/2] Revert "Fix 0.7 clients being dropped" This reverts commit e1b09787ae15114ec4b19396313caa02ca894693. --- src/engine/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 45778ffe8..4b2c1edcd 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -1525,7 +1525,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket) return; } - if(!m_aClients[ClientId].m_GotDDNetVersionPacket && !IsSixup(ClientId)) + if(!m_aClients[ClientId].m_GotDDNetVersionPacket) { DropOldClient(ClientId); return; From 9c799e739431a157c85c46ed6299da04c8befb66 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Sun, 22 Sep 2024 16:36:31 +0200 Subject: [PATCH 2/2] Revert "Ban compromised old versions" This reverts commit db0c83d433d80898b86983e7b6c2199b3483626e. --- src/engine/server/server.cpp | 19 ------------------- src/engine/server/server.h | 1 - src/engine/shared/protocol.h | 2 -- 3 files changed, 22 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 4b2c1edcd..44a2f99b3 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -1434,11 +1434,6 @@ bool CServer::CheckReservedSlotAuth(int ClientId, const char *pPassword) return false; } -void CServer::DropOldClient(int ClientId) -{ - m_NetServer.Drop(ClientId, "This version of the client is compromised. Do not click the update button. ddnet.org/olddomain"); -} - void CServer::ProcessClientPacket(CNetChunk *pPacket) { int ClientId = pPacket->m_ClientId; @@ -1500,13 +1495,6 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket) { return; } - - if(DDNetVersion < VERSION_DDNET_NEW_DOMAIN) - { - DropOldClient(ClientId); - return; - } - m_aClients[ClientId].m_ConnectionId = *pConnectionId; m_aClients[ClientId].m_DDNetVersion = DDNetVersion; str_copy(m_aClients[ClientId].m_aDDNetVersionStr, pDDNetVersionStr); @@ -1524,13 +1512,6 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket) { return; } - - if(!m_aClients[ClientId].m_GotDDNetVersionPacket) - { - DropOldClient(ClientId); - return; - } - if(str_comp(pVersion, GameServer()->NetVersion()) != 0 && str_comp(pVersion, "0.7 802f1be60a05665f") != 0) { // wrong version diff --git a/src/engine/server/server.h b/src/engine/server/server.h index 994051079..7a54efe36 100644 --- a/src/engine/server/server.h +++ b/src/engine/server/server.h @@ -337,7 +337,6 @@ public: void UpdateClientRconCommands(); bool CheckReservedSlotAuth(int ClientId, const char *pPassword); - void DropOldClient(int ClientId); void ProcessClientPacket(CNetChunk *pPacket); class CCache diff --git a/src/engine/shared/protocol.h b/src/engine/shared/protocol.h index e5309b0b8..e0f807b10 100644 --- a/src/engine/shared/protocol.h +++ b/src/engine/shared/protocol.h @@ -126,8 +126,6 @@ enum VERSION_DDNET_MULTI_LASER = 16040, VERSION_DDNET_ENTITY_NETOBJS = 16200, VERSION_DDNET_REDIRECT = 17020, - - VERSION_DDNET_NEW_DOMAIN = 16040, }; typedef std::bitset CClientMask;