Skip to content

fix(chat): reject blank mark-read conversation ids - #167

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/mark-read-conversation-id-guard
Jul 30, 2026
Merged

fix(chat): reject blank mark-read conversation ids#167
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/mark-read-conversation-id-guard

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • Normalize the mark-read conversation id before validation and message filtering.
  • Reject missing or whitespace-only ids before creating the Supabase server client.
  • Add regression coverage for blank route params so invalid requests do not do auth/database work.

Validation

  • git diff --check
  • node node_modules\vitest\vitest.mjs run --config %TEMP%\qryptchat-vitest-minimal.config.mjs "src/app/api/chat/conversations/[id]/mark-read/route.test.js" (3 tests passed)

I also attempted direct execution with the repo's default Vitest config, but the local config currently fails to load because @vitejs/plugin-react imports vite/internal, which is not exported by the installed Vite package. I used a temporary minimal Vitest config only to run this route test and did not modify dependency files.

@ralyodio
ralyodio merged commit 537074c into profullstack:master Jul 30, 2026
8 checks passed
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.

2 participants