My coworker and I are developing an authoritative server for an MMO. We can't agree on how to handle "misbehaving" clients. Misbehaving, in this case, means clients who send "odd" requests that might indicate a compromised/altered client, or even a nefarious user injecting data directly into the communication stream.
One of us believes that the offending request should be aborted, the client's data saved, and the client's connection forcibly closed ("killed"). The other believes the request should be aborted and a "failed" response returned to the client.
We're at an impasse because we can't decide which approach is best. We've both generated arguments, but nothing has been sufficient to sway either of us.
For reference, here are some things we've considered:
- Being disconnected results in an annoyance for legitimate users if we make a mistake coding the "misbehavior detection"
- Killing the client eliminates the need for "clean up" response code.
- If we don't kill the client, we might make a mistake and continue processing the bad request.
- Killing the client prevents a compromised client from sending other potentially bad requests, at least until they log back in.
- A disconnection may not do much to deter cheaters, whereas a denial response may elicit a "big brother is watching" feeling.
Any feedback on our arguments? Are there any other reasons for choosing one over the other? Is there some industry standard, or even a best practices consensus?