aws-sigv4: allow a blank string

make sure a zero length sigv4 gets the default value

Reported-by: Arian van Putten
Fixes #17176
Closes #17178
This commit is contained in:
Daniel Stenberg 2025-04-24 23:39:08 +02:00
parent ae0ff69f7a
commit 2ab6b9d405
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 4 additions and 3 deletions

View file

@ -676,8 +676,9 @@ CURLcode Curl_output_aws_sigv4(struct Curl_easy *data)
* AWS is the default because most of non-amazon providers
* are still using aws:amz as a prefix.
*/
line = data->set.str[STRING_AWS_SIGV4] ?
data->set.str[STRING_AWS_SIGV4] : "aws:amz";
line = data->set.str[STRING_AWS_SIGV4];
if(!line || !*line)
line = "aws:amz";
/* provider0[:provider1[:region[:service]]]