FAForever / faf-java-server

Spring Boot based server for Forged Alliance Forever
12 stars 6 forks source link

Kick players spoofing their rating or name #45

Closed micheljung closed 6 years ago

micheljung commented 7 years ago

People spoofing their rating is a well-known problem. The best solution would be if not the player tells his peers what his rating is, but the peers would know from the server. Unfortunately, we don't seem to be able to send custom messages to the game yet.

As an alternative, temporary solution, peers could tell the server what rating a player has reported to them. The server can then verify the claim against the actual rating and, on mismatch, removes the spoofing player from the game or even better, kickbans the player automatically for a few minutes.

While we can't force the game to be closed or tell the host of the game to kick the spoofing player (and it may even be the host itself who spoofs), removing the player from the game prevents him from receiving commands from the server, thus making it very difficult to impossible to participate in the game.

A unwanted side effect could be that everones game launches but not the spoofer's. This is unfortunate, but should happen very rarely and still kills the motiviation to spoof in the first place.

Same goes for the player's name.

What needs to be done

  1. Add a new GPGNet command like VerifyPlayer
  2. Verify the claim against reality. Account for rounding errors
  3. Kick/Ban player on mismatch