Repository navigation
Conversation
Automation signalsActivity patterns show signs of automation. Evidence
Last 5 PRs:
This is an automated analysis by AgentScan |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
commit: |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
The lockfile retains deduplicable hasown versions, causing the CI vp dedupe --check gate to fail.
1 open issue
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
This PR hardens urllib’s multipart uploads against header injection while preserving existing non-ASCII filename* behavior.
Changes:
- Escape carriage returns, line feeds, and double quotes in multipart filenames.
- Upgrade
form-dataandformstreamfor safer field names and legacy multipart metadata. - Add regression tests for filename injection, field-name escaping, and filename compatibility.
| File | Description |
|---|---|
test/options.files.test.ts |
Tests injection prevention across upload sources and field names. |
test/formData.test.ts |
Tests filename escaping, Unicode compatibility, and custom filepaths. |
src/FormData.ts |
Escapes filenames and updates the own-property check. |
pnpm-lock.yaml |
Locks updated multipart dependencies and transitive resolutions. |
package.json |
Raises minimum multipart dependency versions. |
Review effort: Balanced
| combined-stream: 1.0.8 | ||
| es-set-tostringtag: 2.1.0 | ||
| hasown: 2.0.2 | ||
| hasown: 2.0.4 |

Multipart uploads insert filenames into
Content-Dispositionwithout escaping CR, LF, or double quotes. These characters can inject additional part headers.Encode CR, LF, and double quotes as
%0D,%0A, and%22. Requireform-data@^4.0.6for safe field names andformstream@^1.5.3for safe metadata in legacy stream bodies. MIME types containing CR or LF cause a synchronousTypeErrorinformstream.Preserve the existing
filename*behavior for non-ASCII filenames.