Commit c936027
Fix Content-Disposition header injection in GetObject (G4brym#145)
* Fix Content-Disposition header injection in GetObject
The filename in the Content-Disposition header was interpolated
directly without sanitization. Filenames containing double quotes
could break header parsing or enable header injection.
This fix:
- Strips non-ASCII characters and replaces double quotes in the
ASCII `filename` parameter for compatibility
- Adds RFC 5987 `filename*` parameter with proper UTF-8 percent
encoding, matching the approach used in getShareLink.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix CI: update test for new Content-Disposition format and add changeset
- Update GetObject test to expect the sanitized filename with RFC 5987
filename* parameter added by the header injection fix
- Add required changeset for the patch release
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent aa34984 commit c936027
File tree
3 files changed
+13
-3
lines changed- .changeset
- packages/worker
- src/modules/buckets
- tests/integration
3 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | | - | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments