fix: update upload and websocket dependencies - #1070
Conversation
📝 WalkthroughWalkthroughThe change defines a shared multipart field nesting limit, applies it to three upload areas, updates related dependencies and ESLint boundaries, and adds an integration test for rejecting nested fields. ChangesMultipart upload validation
Sequence Diagram(s)sequenceDiagram
participant Client
participant Multer
participant Express
Client->>Multer: Submit multipart field nested[value]
Multer->>Multer: Apply fieldNestingDepth = 0
Multer-->>Express: Return LIMIT_FIELD_NESTING
Express-->>Client: Respond HTTP 422
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
server/shared/tests/multipart-upload-limits.test.ts (1)
10-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExercise the production upload handlers in addition to this isolated Multer test.
This test proves that the option rejects
nested[value], but it uses a newly created Multer instance rather than the assets, file-tree, or voice middleware. Add at least one request through each affected upload route so a future handler can’t drop the shared limit without failing regression coverage.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@server/shared/tests/multipart-upload-limits.test.ts` around lines 10 - 31, Extend multipart upload limit coverage beyond the isolated Multer instance by issuing requests through each affected production upload route, including the assets, file-tree, and voice handlers. Assert that nested fields are rejected with the expected limit error/status, ensuring each route preserves the shared FLAT_MULTIPART_FIELD_NESTING_DEPTH configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@server/shared/tests/multipart-upload-limits.test.ts`:
- Around line 10-31: Extend multipart upload limit coverage beyond the isolated
Multer instance by issuing requests through each affected production upload
route, including the assets, file-tree, and voice handlers. Assert that nested
fields are rejected with the expected limit error/status, ensuring each route
preserves the shared FLAT_MULTIPART_FIELD_NESTING_DEPTH configuration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e6d75ead-465c-478d-9178-3ead3e1e7ee2
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
eslint.config.jspackage.jsonserver/modules/assets/assets.routes.tsserver/modules/file-tree/file-tree.module.tsserver/modules/voice/voice.module.tsserver/shared/multipart-upload-limits.tsserver/shared/tests/multipart-upload-limits.test.ts
Refresh compatible agent CLIs, package tooling, Python libraries, scanners, and immutable release inputs while preserving HolyClaude's Docker interfaces. Rebuild CloudCLI 1.36.3 with the reviewed upload, WebSocket, account-management, and dependency protections, then bind those versions and behaviors to source and image-level tests. Strengthen release evidence, rollback handling, product-fact validation, and rootless documentation without changing ports, volumes, variants, or runtime configuration. Constraint: Keep Node 26.5.0 Bookworm, Debian Chromium 150.0.7871.181, npm 11.18.0, and Playwright 1.61.0 Rejected: Delay compatible dependency and security updates for unavailable Node and Chromium packages | retain the verified base inputs for this release Security: Remove the targeted ws, Multer, DOMPurify, Express, and path-to-regexp findings from the vendored CloudCLI production tree Confidence: high Scope-risk: broad Directive: Promote only the four release-branch candidate digests that pass native builds, security policy, and runtime smokes Tested: 167 Node tests; 5 Python tests; shell syntax; product-facts validation; immutable-input validation; actionlint; no-cache slim and full amd64 builds; browser, persistence, rootless, CloudCLI-volume, and full-only runtime smokes Not-tested: Native arm64 candidates, digest-bound final scans, registry promotion, and post-publish smokes remain gated by GitHub Actions Related: siteboon/claudecodeui#978, siteboon/claudecodeui#1070
Refresh compatible agent CLIs, package tooling, Python libraries, scanners, and immutable release inputs while preserving HolyClaude's Docker interfaces. Rebuild CloudCLI 1.36.3 with the reviewed upload, WebSocket, account-management, and dependency protections, then bind those versions and behaviors to source and image-level tests. Strengthen release evidence, rollback handling, product-fact validation, and rootless documentation without changing ports, volumes, variants, or runtime configuration. Constraint: Keep Node 26.5.0 Bookworm, Debian Chromium 150.0.7871.181, npm 11.18.0, and Playwright 1.61.0 Rejected: Delay compatible dependency and security updates for unavailable Node and Chromium packages | retain the verified base inputs for this release Security: Remove the targeted ws, Multer, DOMPurify, Express, and path-to-regexp findings from the vendored CloudCLI production tree Confidence: high Scope-risk: broad Directive: Promote only the four release-branch candidate digests that pass native builds, security policy, and runtime smokes Tested: 167 Node tests; 5 Python tests; shell syntax; product-facts validation; immutable-input validation; actionlint; no-cache slim and full amd64 builds; browser, persistence, rootless, CloudCLI-volume, and full-only runtime smokes Not-tested: Native arm64 candidates, digest-bound final scans, registry promotion, and post-publish smokes remain gated by GitHub Actions Related: siteboon/claudecodeui#978, siteboon/claudecodeui#1070
What changed
wsto 8.21.1,multerto 2.2.0, DOMPurify to 3.4.12, and Express to 4.22.2path-to-regexpresolution to 0.1.13fieldNestingDepthto0for image, attachment, voice, and file-tree uploadsLIMIT_FIELD_NESTINGWhy
The previous lock still matched current advisories for WebSocket fragment exhaustion, nested and aborted multipart uploads, DOMPurify configuration bypasses, and
path-to-regexpReDoS. The relevant reports include GHSA-96hv-2xvq-fx4p, GHSA-72gw-mp4g-v24j, GHSA-3p4h-7m6x-2hcm, GHSA-cmwh-pvxp-8882, and GHSA-37ch-88jc-xwx2.HolyClaude currently carries the same dependency correction in its vendored CloudCLI 1.36.3 build. This applies the fix to current CloudCLI 1.37.0 so downstream images do not need to keep patching these dependencies.
The lockfile audit total drops from 51 to 45.
ws,multer,dompurify, andpath-to-regexpno longer appear in the audit findings. The remaining findings are unrelated to this change.Verification
npm cinpm ls dompurify express multer ws path-to-regexp --allnpx tsx --tsconfig server/tsconfig.json --test server/shared/tests/multipart-upload-limits.test.tsnpm run typechecknpm run lint(0 errors; existing warnings remain)npm run buildTSX_TSCONFIG_PATH=server/tsconfig.json npm testgit diff --checkSummary by CodeRabbit
New Features
Bug Fixes
Chores