Skip to content

[Security] Add payload size limit and JSON nesting depth middleware#2886

Open
sanrishi wants to merge 1 commit into
ritesh-1918:gssocfrom
sanrishi:fix/payload-size-middleware
Open

[Security] Add payload size limit and JSON nesting depth middleware#2886
sanrishi wants to merge 1 commit into
ritesh-1918:gssocfrom
sanrishi:fix/payload-size-middleware

Conversation

@sanrishi

Copy link
Copy Markdown

Adds PayloadLimitMiddleware with 10MB body limit and max 20-level JSON nesting check. Fixes #2873

- Add PayloadLimitMiddleware enforcing 10MB max body size
- Add JSON nesting depth check (max 20 levels)
- Returns 413 for oversized payloads, 400 for excessive nesting
- Prevents OOM from deeply nested JSON bombs

Fixes ritesh-1918#2873
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7a652fa-8120-4161-bbbe-d8a4843fcdaa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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