-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
The InputHandler.ts processes incoming JSON messages directly without validation.
- Rate Limiting: There is no throttling. A client can flood the server with thousands of mousemove events per second, potentially freezing the host UI or saturating the network.
- Input Sanitation: There are no length checks on text type messages. A payload with a 50MB string could crash the server or the nut-js automation process.
Steps to Reproduce
- Connect to the WebSocket.
- Send a move or scroll event inside a while(true) loop from a script.
- Result: The host system may become unresponsive due to the flood of input interrupts.
Expected Behavior
- Validation: Ensure msg.text strings are truncated to a reasonable length (e.g., 500 chars). Ensure dx/dy values are within sane bounds.
- Throttling: Implement a basic leaky bucket or throttle mechanism on the server side to ignore input events if they exceed a certain threshold (e.g., >60 events per second).
Desktop Operating System
macOS (Apple Silicon)
Mobile Device (Client)
Vivo T3x 5G
Rein Version
3
Console Logs / Error Messages
Screenshots / Recordings
No response
Checklist
- I have searched for existing issues to avoid duplicates
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working