aws_sigv4: the query canon code miscounted URL encoded input

Added some extra ampersands to test 439 to verify "blank" query parts

Follow-up to fc76a24c53

Closes #11829
This commit is contained in:
Daniel Stenberg 2023-09-10 23:47:38 +02:00
parent d5c562cd0d
commit a1532a33b3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 6 additions and 3 deletions

View file

@ -445,6 +445,7 @@ static CURLcode canon_query(struct Curl_easy *data,
tmp[2] = Curl_raw_toupper(q[2]);
result = Curl_dyn_addn(dq, tmp, 3);
q += 2;
len -= 2;
}
else
/* '%' without a following two-digit hex, encode it */
@ -667,6 +668,8 @@ CURLcode Curl_output_aws_sigv4(struct Curl_easy *data, bool proxy)
if(!canonical_request)
goto fail;
DEBUGF(infof(data, "Canonical request: %s", canonical_request));
/* provider 0 lowercase */
Curl_strntolower(provider0, provider0, strlen(provider0));
request_type = curl_maprintf("%s4_request", provider0);