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
|
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the multipart header-injection fix.
No open issues 🎉
What changed in this PR
This PR addresses multipart header injection in urllib’s 2.x branch by requiring upstream escaping from formstream.
Changes:
- Raises the minimum
formstreamversion to1.5.3. - Adds regression tests for escaping quotes, CR, and LF in filenames and field names across buffer, stream, and file uploads.
- Tests that escaping preserves filesystem access and leaves other filename characters unchanged.
| File | Description |
|---|---|
test/multipart-escaping.test.js |
Adds multipart escaping and filesystem-path regression tests. |
package.json |
Updates formstream to ^1.5.3 for upstream header-injection protection. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #987 +/- ##
=======================================
Coverage 89.94% 89.94%
=======================================
Files 6 6
Lines 875 875
Branches 243 243
=======================================
Hits 787 787
Misses 88 88 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The
2.xmultipart encoder relies onformstream. Older versions insert filenames and field names into headers without escaping them, which allows multipart header injection.Require
formstream@^1.5.3to encode CR, LF, and double quotes in field names and filenames. MIME types containing CR or LF cause a synchronousTypeError. Use the upstream implementation directly and preserve the original paths for file access and filenames for MIME type detection.