mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix protocol abuse exception.
This commit is contained in:
@@ -47,7 +47,7 @@ END TEMPLATE-->
|
||||
|
||||
### Other
|
||||
|
||||
*None yet*
|
||||
* Fix bug in `NetManager` that allowed exception spam through protocol abuse.
|
||||
|
||||
### Internal
|
||||
|
||||
|
||||
@@ -845,7 +845,13 @@ namespace Robust.Shared.Network
|
||||
return true;
|
||||
}
|
||||
|
||||
var channel = _channels[msg.SenderConnection];
|
||||
if (!_channels.TryGetValue(msg.SenderConnection, out var channel))
|
||||
{
|
||||
_logger.Warning($"{msg.SenderConnection.RemoteEndPoint}: Got unexpected data packet before handshake completion.");
|
||||
|
||||
msg.SenderConnection.Disconnect("Unexpected packet before handshake completion");
|
||||
return true;
|
||||
}
|
||||
|
||||
var encryption = IsServer ? channel.Encryption : _clientEncryption;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user