Repository navigation
Conversation
The event had no permission check or rate limit, so spamming it with a lot of players online made the server build and send the full player list every time and eat a lot of CPU. Now it needs OnlinePlayers.Menu, a player can ask once per second, and the list is built at most once per second and shared. The client also stops waiting after 3 seconds so a dropped request doesn't leave the menu stuck.
Collaborator
|
No further changes will be made to the old vMenu at this point. Closing this PR for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vMenu:RequestPlayerListhad no permission check and no rate limit. With 100+ players online, spamming it makes the server build and send the whole player list on every request, and the server CPU goes way up. Pretty easy to abuse.vMenu.OnlinePlayers.Menunow, players without it get an empty list backWaitRequested()gives up after 3 seconds, otherwise one dropped request would leave the Online Players menu waiting foreverOnly thing to know: private messages also use this list to get the sender name, so someone without OnlinePlayers.Menu who gets a PM will see Invalid as the name. Everyone has that permission by default so it shouldn't matter for most servers.