googleapis / googleapis/google-cloud-rust

Signed URL V4 leaves asterisk (*) unencoded in canonical query string

Open
#6,693 0 comments 0 reactions 0 assignees View on GitHub
api: storage type: bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.