Add exception handling to NetManager#6523
Add exception handling to NetManager#6523mastermiller01 wants to merge 4 commits intospace-wizards:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
This is not a fix. Malformed packets should be rejected without exceptions being thrown and the client disconnected. Exceptions, admin alerts, logs, etc waste CPU time and give denial of service attempts extra beef.
If you or someone else has crash logs demonstrating a problem here, please DM it to me on discord @moonykay and I'll resolve this correctly.
|
This PR does not throw any exceptions. |
|
Is this gonna be merged any time soon? Both goob and trauma were getting ddossed because of this, traumas already merged this in their own robust toolbox but it would be far better if it was merged on the actual one |
Are goob and trauma using the actual fix, or are they experiencing something new and novel they should be reporting? Because not reporting problems is precisely why I'm not a fan of this fix. |
Trauma is using this fix and the ddos has stopped and is experiencing no abnormalities, goob doesn't have this and was getting ddossed a few days ago..... |
Is trauma using this fix, or the upstream fix. Because that's my question. Obviously this works, but my point is it doesn't fix the underlying issue. The engine is not a "well it works :)" environment. |
When a client sends a malformed packet that (for any unforseeable reason, not just decryption) might throw an exception, currently it goes almost completely unhandled.
This PR changes it to catch and log the error, then kick the client and have an event for content to do admin alert, etc. with the channel after it's been kicked.
I have tested this with a well-behaved client and nothing bad happens to it.