(svn r14897) -Codechange: don't allow a few command flags to be sent over the network as it's bogus information anyway; e.g. the "do not send over network" flag as it will be set whenever the command is received from the server/client.
-Codechange: test earlier whether the command (send from the server) is actually valid.
This commit is contained in:
@@ -839,6 +839,11 @@ static bool CheckCommandFlags(const CommandPacket *cp, const NetworkClientInfo *
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((cp->cmd & CMD_FLAGS_MASK) != 0) {
|
||||
IConsolePrintF(CC_ERROR, "WARNING: invalid command flag from client %d (IP: %s), kicking...", ci->client_id, GetClientIP(ci));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user