Skip to content

fix: validate message creation payloads#2068

Open
Ceyvion wants to merge 1 commit into
SecureBananaLabs:mainfrom
Ceyvion:fix/message-payload-validation-2067
Open

fix: validate message creation payloads#2068
Ceyvion wants to merge 1 commit into
SecureBananaLabs:mainfrom
Ceyvion:fix/message-payload-validation-2067

Conversation

@Ceyvion
Copy link
Copy Markdown

@Ceyvion Ceyvion commented May 30, 2026

Closes #2067
/claim #743

Summary

  • add a message creation schema requiring fromUserId, toUserId, and body
  • return HTTP 400 for malformed message payloads
  • add endpoint regression coverage for malformed and complete message creation requests

Verification

  • node --test apps/api/src/tests/messageValidation.test.js
  • node --test apps/api/src/tests/health.test.js apps/api/src/tests/messageValidation.test.js
  • git diff --check

github-actions Bot added a commit that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Message creation should reject malformed payloads

1 participant