Commit 1d5f4c4
authored
Fix date signing for s3 path (#296)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Touches S3 request signing for cloud uploads; wrong encoding would
break uploads, but the change is narrow and covered by a focused test.
>
> **Overview**
> Fixes **AWS SigV4** signing for S3 uploads when object keys include
hive-style segments such as `date=2026-07-12`.
>
> `signS3Request` now builds the canonical request URI with a new
**`awsCanonicalURI`** helper instead of **`req.URL.EscapedPath()`**, so
characters like `=` are percent-encoded the way S3 expects (e.g.
`date%3D2026-07-12`). That aligns the signature with the real object
path and should stop auth failures on partitioned runtime keys.
>
> A unit test covers encoding of `=` in those paths.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
af017da. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
683 | 707 | | |
684 | 708 | | |
685 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
| |||
0 commit comments