-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Context
The Venice API route (src/app/api/venice/background/route.ts) takes userInput and sends it to an LLM. While we flagged prompt injection earlier, there's a resource exhaustion risk.
Problem
- DoS (Denial of Service): A user could send a massive text payload (megabytes of text).
- Cost Spike: Processing huge tokens costs money (Venice/LLM API costs).
- Timeout: The serverless function might time out processing a huge string.
Proposed Solution
Validate and truncate input length.
- Enforce a character limit (e.g.,
z.string().max(1000)). - Reject requests larger than the limit immediately with 400 Bad Request.
Acceptance Criteria
- Sending a payload > 2000 characters returns a 400 error.
- The input is truncated before being logged or sent to the external API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
No status