googleapis / googleapis/google-cloud-rust
Signed URL V4 leaves asterisk (*) unencoded in canonical query string
- Dominant language
- Rust
- Stars
- 955
- Forks
- 144
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 279
Description
Unconfirmed. This is the result of a search with Claude, may be a false positive.
When building the canonical query string for V4 signed URLs in `src/storage/src/storage/signed_url.rs`, `form_urlencoded::Serializer` is used:
https://github.com/googleapis/google-cloud-rust/blob/f02b42c2ac5720334cd2b5335824bd4166264527/src/storage/src/storage/signed_url.rs#L546-L557
Standard `application/x-www-form-urlencoded` encoding leaves `*` unencoded. However, Google Cloud Storage V4 signature specifications require uri-encoding all characters except unreserved characters (`A-Za-z0-9-_.~`).
Because `*` is not encoded in the signed string, any query parameter containing an asterisk (such as `response-content-disposition` with `filename*=UTF-8''...`) generates a signature that Cloud Storage rejects with `403 Forbidden`.
Contributor guide
Research direction
Start in src/storage/src/storage/signed_url.rs around lines 546-557 and inspect how the canonical query string is serialized. Reproduce the case with an asterisk in a query parameter such as response-content-disposition, then check the generated canonical string and signing behavior. Done means the suspected encoding issue is confirmed or disproved with a focused regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100