MEDIUM: No Request Validation on Web UI API #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The web API endpoints (bot/api.py) do not validate incoming request parameters, allowing invalid or malicious data to reach the bot logic.
Where It Occurs
Why This Is a Problem
What Can Go Wrong
Scenario 1: Negative GPU Index
Scenario 2: Large Message Payload
Proposed Fix
Use Pydantic for request validation with schema definitions.
Severity
MEDIUM - Lack of validation causes crashes and poor error messages.
Files Affected
bot/api.py, bot/api_main.py