-
Notifications
You must be signed in to change notification settings - Fork 1.1k
endpointOverride with bare IPv6 address fails valid domain check #3244
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
Comments
I confirm your observation and am working on a fix |
For reference:awslabs/aws-c-common#1180 |
Hi @sbera87 ! I was also facing the same issue and I saw your reference: awslabs/aws-c-common#1180. I am using aws-sdk-cpp version 1.11.454 . Is this issue resolved? If yes, which version would I have to use now? Thanks! |
Hello, we are still waiting on internal dependencies, after which the fix will be picked up and released |
Thanks for the quick response! Can you update it here once released, so that we get to use it! Thanks! |
should get resolved upstream later here: aws#3244
Hi, Best regards |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I've found that with a bare IPv4 address I'm able to set endpointOverride and successfully make requests against a non-AWS S3 endpoint.
However, with a bare IPv6 address, we get this error:
I found that the problem arises here: https://github.com/aws/aws-sdk-cpp/blob/main/src/aws-cpp-sdk-core/source/utils/DNS.cpp#L43
The endpoint gets passed into the function. We check if it has any
.
characters, and if not, fail theIsValidHost()
function. Bare IPv4 addresses pass this test. But bare IPv6 addresses, lacking.
characters, fail the test.I also found that if I make an /etc/hosts entry for the IPv6 address I want to use and pass that instead, the client works. So connectivity works if we don't block ourselves with this test.
Can you rework it so that we also pass this test if the endpoint is a bare IPv6 address?
When searching to see if this had already been raised, I saw this issue has come up before a couple of other times without being diagnosed:
#1857
#3054
Regression Issue
Expected Behavior
I should be able to set an IPv6 address as my endpoint, and it should work.
Current Behavior
The client fails out with a message that the endpoint has an invalid DNS label.
Reproduction Steps
I wasn't trying to reach ::1, but you should be able to easily repro by instantiating a client with a config that has endpointOverride set to
https://[::1]:80
.Possible Solution
Fix the cited check to allow valid IPv6 addresses to pass the check.
Additional Information/Context
No response
AWS CPP SDK version used
1.11.328
Compiler and Version used
clang 17
Operating System and version
CentOS 9
The text was updated successfully, but these errors were encountered: