Skip to content

aws-sigv4: fix canonical path encoding#13814

Closed
outscale-mgo wants to merge 2 commits intocurl:masterfrom
outscale-mgo:canonical_path
Closed

aws-sigv4: fix canonical path encoding#13814
outscale-mgo wants to merge 2 commits intocurl:masterfrom
outscale-mgo:canonical_path

Conversation

@outscale-mgo
Copy link
Contributor

fix: #13754

I refactor canon_query, so I could use the encoding part of the function to use it in the path.

As the path doesn't encode '/', but encode '=', I had to add some conditions to know If I was doing the query or path encoding.

Also, instead of adding a bool in_path variable, I use bool *found_equals to know if the function was called for the query or path, as found_equals is used only in query_encoding.

Note: When I try replacing manually = with %3D, curl without this patch worked, so they might still be a bug out-there.

@github-actions github-actions bot added the tests label May 28, 2024
@outscale-mgo outscale-mgo force-pushed the canonical_path branch 3 times, most recently from 923c78f to 5c31b6c Compare May 28, 2024 15:35
@outscale-mgo outscale-mgo changed the title Canonical path aws-sigv4: fix canonical path encoding May 28, 2024
I refactor canon_query, so I could use the encoding part
of the function to use it in the path.

As the path doesn't encode '/', but encode '=', I had to
add some conditions to know If I was doing the query or path encoding.

Also, instead of adding a `bool in_path` variable, I use `bool *found_equals`
to know if the function was called for the query or path,
as found_equals is used only in query_encoding.

fix: curl#13754

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
@bagder bagder closed this in 768909d May 29, 2024
@bagder
Copy link
Member

bagder commented May 29, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

aws-sigv4 does not work with URLs containing "=" and other special characters

2 participants