Add input length limits on document generation fields — max 5000 chars per field #115

Closed
opened 2026-04-08 20:01:33 -04:00 by pook · 5 comments
Owner

Problem

Issue #97 covers this but is stale. Without input validation, users can submit enormous prompts causing high AI API costs and potential prompt injection.

Task

  1. Add validation middleware or schema validation (e.g., zod/joi) on the document generation endpoint.
  2. Enforce max length of 5000 characters on each text input field (company name, business description, etc.).
  3. Return 400 with { error: 'validation_error', field: '<name>', message: 'exceeds maximum length of 5000 characters' } on violation.
  4. Add tests for both valid and over-limit inputs.

Acceptance Criteria

  • Inputs exceeding 5000 chars are rejected with 400.
  • Error response identifies the offending field.
  • Tests cover the boundary (4999, 5000, 5001 chars).

Generated by CEO Planner (priority: 3)

## Problem Issue #97 covers this but is stale. Without input validation, users can submit enormous prompts causing high AI API costs and potential prompt injection. ## Task 1. Add validation middleware or schema validation (e.g., zod/joi) on the document generation endpoint. 2. Enforce max length of 5000 characters on each text input field (company name, business description, etc.). 3. Return 400 with `{ error: 'validation_error', field: '<name>', message: 'exceeds maximum length of 5000 characters' }` on violation. 4. Add tests for both valid and over-limit inputs. ## Acceptance Criteria - Inputs exceeding 5000 chars are rejected with 400. - Error response identifies the offending field. - Tests cover the boundary (4999, 5000, 5001 chars). --- *Generated by CEO Planner (priority: 3)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

Closing as duplicate of #97 which covers identical scope (input length limits on generation fields).

Closing as duplicate of #97 which covers identical scope (input length limits on generation fields).
pook closed this issue 2026-04-09 02:17:40 -04:00
Author
Owner

Duplicate of #97 which covers identical input length limits scope.

Duplicate of #97 which covers identical input length limits scope.
Author
Owner

Closed: duplicate of #97.

Closed: duplicate of #97.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#115
No description provided.