Skip to content

[codex] add input length guards#225

Closed
saurabhhhcodes wants to merge 1 commit into
chthonn:mainfrom
saurabhhhcodes:codex/input-length-guards
Closed

[codex] add input length guards#225
saurabhhhcodes wants to merge 1 commit into
chthonn:mainfrom
saurabhhhcodes:codex/input-length-guards

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

What changed

  • Added backend validation for chat messages so empty or oversized messages are rejected before save.
  • Added backend validation for server names so create-server requests are normalized and capped.
  • Added frontend length caps and live counters for the chat composer and server name input.

Why

The app was accepting free-form input without clear length guardrails. That created a mismatch between the UI and server expectations and left room for invalid payloads.

Impact

Users now get immediate feedback in the UI, and the backend rejects invalid requests consistently.

Validation

  • git diff --check
  • node --check server/src/routes/chat.js
  • node --check server/src/routes/servers.js
  • npm run build in frontend

Closes #135

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the Sunil Kumar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@saurabhhhcodes

Copy link
Copy Markdown
Author

Closing this as a duplicate of the already-open input-limit PR #183 so we avoid overlapping work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No input length validation on message or server name fields

1 participant