piqueserver icon indicating copy to clipboard operation
piqueserver copied to clipboard

Users can spam commands to destroy the CPU

Open lokka30 opened this issue 4 years ago • 1 comments

Describe the bug Users can spam commands such as /commands to destroy the CPU.

I believe this issue is solely caused by the 'send user a list of messages' code. See Expected behavior below.

To fix this, I believe the commands should be locked until the previous usage of the command has finished sending the entire list of messages.

To Reproduce Have a bot rapidly run list-based commands such as /commands, and most likely also /scripts, /help, and so on.

Expected behavior This is where the issue kind-of separates into a feature request. Here's the intended behavior I am thinking of:

  1. User runs /commands
  2. Commands start to display to the user
  3. Two seconds later, whilst the previous command is still being ran, the user runs /commands again
  4. Second command fails as the user is already being displayed the output of /commands from their first usage.

Stack Trace or logs Well, my logs would be full of someone destroying the server by constantly running such commands.

Server (please complete the following information): Not applicable to the issue.

Client (if relevant) Not applicable to the issue.

Additional context I have temporarily disabled these commands on The Hallway due to their misuse.

lokka30 avatar Apr 25 '21 03:04 lokka30

This is resolved by my two PRs, #721 and #722

lokka30 avatar Jun 11 '22 07:06 lokka30