Skip to content

fix(messages): validate encrypted content type - #199

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/message-encrypted-content-string-guard
Open

fix(messages): validate encrypted content type#199
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/message-encrypted-content-string-guard

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • validate message recipient encrypted_content before base64 / serialized Buffer processing
  • return a controlled error for corrupt non-string encrypted content instead of throwing while handling the failure path
  • add regression coverage for malformed encrypted content returned from the database

Test

  • node node_modules\vitest\vitest.mjs run --config %TEMP%\qryptchat-vitest-minimal.config.mjs "src/app/api/chat/messages/[id]/route.test.js"
  • git diff --check

uGig billing

  • Expected invoice: 0.50 USD if accepted/merged
  • Counted as revenue now: no, pending review/payment

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.

1 participant