Skip to content
Permalink
Browse files

Fix server assert in case of invalid message from client, just kick t…

…hat client.
  • Loading branch information...
sapier sapier
sapier authored and sapier committed Jun 21, 2014
1 parent 2b9beea commit f8522d50e7c92438a3397d9965ac346613fbbfb9
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/server.cpp
@@ -1752,7 +1752,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
else if(command == TOSERVER_CLIENT_READY) {
// clients <= protocol version 22 did not send ready message,
// they're already initialized
assert(peer_proto_ver > 22);
if (peer_proto_ver <= 22) {
infostream << "Client sent message not expected by a "
<< "client using protocol version <= 22,"
<< "disconnecing peer_id: " << peer_id << std::endl;
m_con.DisconnectPeer(peer_id);
return;
}

PlayerSAO* playersao = StageTwoClientInit(peer_id);

0 comments on commit f8522d5

Please sign in to comment.
You can’t perform that action at this time.