Skip to content

Commit

Permalink
Revert "Ban compromised old versions"
Browse files Browse the repository at this point in the history
This reverts commit db0c83d.
  • Loading branch information
def- committed Sep 22, 2024
1 parent 804d85c commit 9c799e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/engine/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ class CServer : public IServer
void UpdateClientRconCommands();

bool CheckReservedSlotAuth(int ClientId, const char *pPassword);
void DropOldClient(int ClientId);
void ProcessClientPacket(CNetChunk *pPacket);

class CCache
Expand Down
2 changes: 0 additions & 2 deletions src/engine/shared/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<MAX_CLIENTS> CClientMask;
Expand Down

0 comments on commit 9c799e7

Please sign in to comment.