MirrorNetworking / MirrorNetworking/Mirror
ReadyMessage spam -> forced observer rebuilds
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 870
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
A malicious client can send as many ReadyMessages as they want and cause observers to be rebuilt every time (potentially slow):
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkManager.cs#L1073-L1078
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkManager.cs#L1176-L1184
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkServer.cs#L668-L678
Expected behavior
NetworkServer.SetClientReady should return early if isReady is already true (this might break stuff, I'm not too familiar with the ready part of the code)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Assets/Mirror/Runtime/NetworkServer.cs around SetClientReady, then trace the ReadyMessage handling in NetworkManager.cs at the referenced lines. Confirm how repeated ready messages trigger observer rebuilding and identify the existing ready-state behavior. Done means repeated ReadyMessages no longer rebuild observers for an already-ready client without breaking the ready flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100