Sanitize aws service custom endpoints#48992
Merged
rosstimothy merged 1 commit intomasterfrom Nov 14, 2024
Merged
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
hugoShaka
approved these changes
Nov 14, 2024
Contributor
hugoShaka
left a comment
There was a problem hiding this comment.
LGTM, a few files are missing licenses
hugoShaka
reviewed
Nov 14, 2024
| "regexp" | ||
| ) | ||
|
|
||
| var schemeRegex = regexp.MustCompile("^([^:]+)://") |
Contributor
There was a problem hiding this comment.
nit: Do we really have to write our own regular expression? There is no function in the standard packages doing that?
Contributor
Author
There was a problem hiding this comment.
I'm not sure that we could do a url.Parse and inspect the scheme, I believe that would fail if someone was using an ip:port instead of a dns name.
There is a slight behavior change in aws-sdk-go-v2 regarding custom endpoints. The new sdk requires the endpoints to be a valid URI, and the legacy sdk would allow a hostname only enpoint and automatically apply a scheme. To prevent breaking existing configurations when upgrading to v17, we now have to apply the same logic to endpoints manually that the legacy sdk used to apply for us. Closes #48760.
1f8dd5d to
80c71ab
Compare
r0mant
approved these changes
Nov 14, 2024
|
@rosstimothy See the table below for backport results.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a slight behavior change in aws-sdk-go-v2 regarding custom endpoints. The new sdk requires the endpoints to be a valid URI, and the legacy sdk would allow a hostname only enpoint and automatically apply a scheme. To prevent breaking existing configurations when upgrading to v17, we now have to apply the same logic to endpoints manually that the legacy sdk used to apply for us.
Closes #48760.