Skip to content
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

Address virtual host style addressing bugs for short subdomains provided in endpoint_url #2941

Merged
merged 3 commits into from
May 12, 2023

Conversation

dlm6693
Copy link
Contributor

@dlm6693 dlm6693 commented May 12, 2023

This addresses #2938. Currently RuleSetStandardLibrary.aws_is_virtual_hostable_s3_bucket is performing the exact same validations on the entire input value as it does with individual subdomains within the input value. This is incorrect because only the entire value needs to be at least 3 characters, not each individual component. As described in the issue, this caused a bug when enabling virtual style addressing and providing an endpoint_url to an S3 client that is insecure (http not https). For bucket names that look like URLs containing short subdomain fragments, path style is being used instead which is incorrect.

Additionally, we only need to perform validation that the input value is not an IPV4 address, None and all lowercase at the top level so the recursive check has been removed.

@dlm6693 dlm6693 requested review from jonemo and nateprewitt May 12, 2023 20:36
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 ⚠️

Comparison is base (22a19ea) 93.29% compared to head (3dbb49d) 93.26%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2941      +/-   ##
===========================================
- Coverage    93.29%   93.26%   -0.04%     
===========================================
  Files           64       64              
  Lines        13590    13588       -2     
===========================================
- Hits         12679    12673       -6     
- Misses         911      915       +4     
Impacted Files Coverage Δ
botocore/endpoint_provider.py 99.01% <100.00%> (-0.01%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dlm6693 dlm6693 requested a review from nateprewitt May 12, 2023 21:04
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlm6693 dlm6693 merged commit d95d441 into boto:develop May 12, 2023
@dlm6693 dlm6693 deleted the virtual-style-short-subdomain-bug branch May 12, 2023 21:29
aws-sdk-python-automation added a commit that referenced this pull request May 15, 2023
* release-1.29.134:
  Bumping version to 1.29.134
  Update to latest partitions and endpoints
  Update to latest models
  Address virtual host style addressing bugs for short subdomains provided in ``endpoint_url`` (#2941)
  Fix .git-blame-ignore-revs hash (#2936)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants