UnpackAndInvoke: invalid message header errors changed to warnings. it can happen if an attacker sends random data.

This commit is contained in:
vis2k 2021-09-02 19:29:31 +08:00
parent 2026b6038b
commit f67704bbd9
2 changed files with 4 additions and 2 deletions

View File

@ -318,7 +318,8 @@ static bool UnpackAndInvoke(NetworkReader reader, int channelId)
}
else
{
Debug.LogError("Invalid message header.");
// => WARNING, not error. can happen if attacker sends random data.
Debug.LogWarning("Invalid message header.");
// simply return false. caller is responsible for disconnecting.
//connection.Disconnect();
return false;

View File

@ -451,7 +451,8 @@ static bool UnpackAndInvoke(NetworkConnectionToClient connection, NetworkReader
}
else
{
Debug.LogError($"Invalid message header for connection: {connection}.");
// => WARNING, not error. can happen if attacker sends random data.
Debug.LogWarning($"Invalid message header for connection: {connection}.");
// simply return false. caller is responsible for disconnecting.
//connection.Disconnect();
return false;