Repository navigation
Conversation
Automation signalsActivity patterns show signs of automation. Evidence
Last 5 PRs:
This is an automated analysis by AgentScan |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #984 +/- ##
==========================================
+ Coverage 94.77% 94.91% +0.14%
==========================================
Files 10 10
Lines 746 747 +1
Branches 235 235
==========================================
+ Hits 707 709 +2
+ Misses 36 35 -1
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the multipart upload hardening changes.
No open issues 🎉
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
This PR hardens urllib’s multipart uploads against header injection by escaping unsafe filename characters and requiring patched multipart dependencies.
Changes:
- Escape CR, LF, and double quotes in filenames while preserving existing non-ASCII
filename*behavior. - Add regression tests for filename and field-name escaping across upload sources.
- Raise dependency minimums and exempt
formstream@1.5.3from the minimum release age check.
| File | Description |
|---|---|
test/options.files.test.ts |
Tests injection prevention across upload sources and normal field names. |
test/formData.test.ts |
Tests filename escaping, compatibility, and normalized filepaths. |
src/FormData.ts |
Escapes unsafe filename characters before header serialization. |
pnpm-workspace.yaml |
Allows immediate installation of formstream@1.5.3. |
pnpm-lock.yaml |
Updates dependency requirements and locks the patched formstream release. |
package.json |
Requires form-data@^4.0.6 and formstream@^1.5.3. |
Review effort: Balanced
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. Allowformstream@1.5.3through the minimum release age check so the security fix can be installed immediately.Summary by CodeRabbit