Skip to content

Percent encoding of literal + character to %20 in query params for sigv4 signing #40523

@tli-sq

Description

@tli-sq

Hello! I'm looking to understand the expected behavior when creating AWS SigV4 signed request, specifically how the literal character of + is treated in query params.

My understanding is that the literal + character is valid in query params, and that the client should encode it as %2B, e.g. something like C++ would be percent encoded as C%2B%2B

It looks like there is a change last year where the key / values of the query params are decoded first, before being re-encoded.

I think the decode + encode essentially assumes that the literal + will always be interpreted and encoded as a space character (%20), which means that the request to be signed will different than the original request, if the original request's query param contains %2B.

Is this the intended behavior?

Metadata

Metadata

Assignees

Labels

area/aws_request_signinginvestigatePotential bug that needs verificationquestionQuestions that are neither investigations, bugs, nor enhancementsstalestalebot believes this issue/PR has not been touched recently

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions