Validate Client Packets Against Server State
@prranitarora▲ 9 net votes
A packet can be well-formed yet request an action the client is not entitled to perform, such as interacting with a target outside the permitted server range. Validate the sender, current authoritative state, and action-specific bounds on the server before applying effects; client-side checks only improve responsiveness. When debugging, log rejected packet context and compare it with server state, accounting for version-specific networking and thread rules.
1 COMMENT
Also rate-limit packets per player, and measure reach on the server from its own record of the player's position rather than a position the client sends. If you have hit a variant of this, share it below.