Skip to content

fix(security): bound JSON bodies and password length - #70

Merged
ArianAr merged 1 commit into
mainfrom
fix/67-body-and-password-limits
Jul 15, 2026
Merged

fix(security): bound JSON bodies and password length#70
ArianAr merged 1 commit into
mainfrom
fix/67-body-and-password-limits

Conversation

@ArianAr

@ArianAr ArianAr commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Shared readBodyWithLimit / readJsonBodyWithLimit for create (JSON + stream) and unlock
  • Max password length 1024; reject before scrypt on create/unlock
  • Unit + integration tests for 413/400 paths

Closes #67

Test plan

  • pnpm test (128 tests)
  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • CI aggregate ci green

JSON create and unlock parse only after a hard byte limit. Passwords
over 1024 characters are rejected before scrypt to stop CPU DoS.

Closes #67
@ArianAr
ArianAr force-pushed the fix/67-body-and-password-limits branch from 2a318b2 to 860c5b2 Compare July 15, 2026 23:46
@ArianAr

ArianAr commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Code review summary

Reviewed body limits + password length caps.

Verdict: No bug-severity findings. One suggestion (unlock body cap vs max password JSON expansion) — non-blocking.

Rebased onto main after #68/#69. Waiting for CI green then merge.

@ArianAr
ArianAr merged commit c5c333c into main Jul 15, 2026
9 of 10 checks passed
@ArianAr
ArianAr deleted the fix/67-body-and-password-limits branch July 15, 2026 23:48
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.

security: bound JSON create/unlock bodies and max password length

1 participant