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

bucket: ensure Bucket::exists() honours 'dangereous' config #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whitty
Copy link

@whitty whitty commented Feb 22, 2025

The following fails on connections that have invalid SSL certificates. Other operations on the bucket succeed.

let bucket = Bucket::new("mybucket", region.clone(), credentials.clone())?
    .set_dangereous_config(true, false)?
    .with_path_style();

assert!(bucket.exists().unwrap());  // fails with 

The existing exists() implementation creates a dummy_bucket and calls a static method to lookup the buckets and find ours. In doing so it discards most of the configuration in order to "" null out the bucket name.

I've forced the issue by duplicating the dummy_handle via clone(). There's probably a smarter way to do this though.

If the name = "" part isn't needed then clone() could be skipped altogether.


This change is Reviewable

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.

1 participant