]> git.ipfire.org Git - thirdparty/curl.git/commit
aws-sigv4: url encode the canonical path
authorMatthias Gatto <matthias.gatto@outscale.com>
Mon, 27 May 2024 12:58:11 +0000 (14:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 29 May 2024 11:02:52 +0000 (13:02 +0200)
commit768909d89cb3089f96fb495b13e636ecf0742e3d
treebfdf9cc419632d4a1a71024c39dc8a2d07fe3582
parent24b66a1de38fdf5fdf57e8a6be8f683c0dfe298f
aws-sigv4: url encode the canonical path

Refactors canon_query, so it 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.

Test 472 verifies.

Reported-by: Alexander Shtuchkin
Fixes #13754
Closes #13814

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
lib/http_aws_sigv4.c
tests/data/Makefile.inc
tests/data/test472 [new file with mode: 0644]