Repository navigation
fix: bound export-user-data request bodies - #543
Draft
9thLevelSoftware wants to merge 1 commit into
Draft
9thLevelSoftware wants to merge 1 commit into
9thLevelSoftware wants to merge 1 commit into
Conversation
Read the GDPR export body through readBoundedRequestBody at the 16 KiB small-JSON limit and return 413 when it is exceeded. Co-authored-by: Devil <9thLevelSoftware@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
phoenix-portal | 53490b2 | Commit Preview URL Branch Preview URL |
Oct 26 2026, 08:25 AM |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified on current
main(177e96a):export-user-datastill parsed the body withreq.json(), which has no size cap. The shared helper isreadBoundedRequestBody. There is no single 64 KiB limit; small JSON command bodies use 4 KiB (deleteAccount) and 16 KiB (generateInsights).export-user-datanow reads through that helper at 16 KiB (REQUEST_BODY_LIMITS.exportUserData), the same ceiling asgenerate-insights. An over-limit body returns 413{ "error": "Request body too large" }, matching the other handlers. Auth, the invalid-JSON 400, and the export page logic are unchanged. A real page request is{ table, cursor? }with cursor values capped at 512 characters, so 16 KiB does not cut off a legitimate export (FP-6).Tests:
deno testonexport-user-data/index.test.tsand_shared/requestBody.test.ts— 26 passed, 0 failed, 4 ignored (local-stack integration tests).deno checkanddeno linton the touched files were clean, with no warnings. Biome does not includesupabase/functions/**.