mirror of
https://github.com/curl/curl.git
synced 2026-08-06 14:16:15 +03:00
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:
parent
d5c562cd0d
commit
a1532a33b3
2 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue