8000 `--aws-sigv4` should be allowed to be called without parameters · Issue #17176 · curl/curl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

--aws-sigv4 should be allowed to be called without parameters #17176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8000
arianvp opened this issue Apr 24, 2025 · 2 comments
Closed

--aws-sigv4 should be allowed to be called without parameters #17176

arianvp opened this issue Apr 24, 2025 · 2 comments

Comments

@arianvp
Copy link
arianvp commented Apr 24, 2025

I did this

curl --aws-sigv4 https://us-east-1.s3.amazonaws.com/my-bucket --user key:secret

I expected the following

I would expect it to be equivalent to --aws-sigv4 amz:aws (and thus equivalent to --aws-sigv4 amz:aws:us-east-1:s3) due to:

Setting CURLOPT_HTTPAUTH with the CURLAUTH_AWS_SIGV4 bit set is the same as setting this option with a "aws:amz" parameter.

from https://curl.se/libcurl/c/CURLOPT_AWS_SIGV4.html

curl: option --aws-sigv4: requires parameter

I think this should just work if we change DENY_BLANK to ALLOW_BLANK in

err = getstr(&config->aws_sigv4, nextarg, DENY_BLANK);

(and update the docs)

curl/libcurl version

curl 8.7.1

operating system

Darwin Mac 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 arm64

@bagder
Copy link
Member
bagder commented Apr 24, 2025

Due to how the curl option parser works, it cannot in fact work entirely without a parameter - there must always be one. It could still work with a blank one, like curl --aws-sigv4 "" https://example.com. Does it?

@arianvp
Copy link
Author
arianvp commented Apr 24, 2025
curl: option --aws-sigv4: blank argument where content is expected

bagder added a commit that referenced this issue Apr 24, 2025
make sure a zero length sigv4 gets the default value

Reported-by: Arian van Putten
Fixes #17176
@bagder bagder closed this as completed in 2ab6b9d Apr 25, 2025
nbaws pushed a commit to nbaws/curl that referenced this issue Apr 26, 2025
make sure a zero length sigv4 gets the default value

Reported-by: Arian van Putten
Fixes curl#17176
Closes curl#17178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants
0