Skip to content

Dots in bucket name let connection fail due to hostname mismatch (requests.exceptions.SSLError) #52

@marians

Description

@marians

When trying to upload to a bucket that has . in its name, this happens:

requests.exceptions.SSLError: hostname 'some.bucket.name.s3-eu-west-1.amazonaws.com' doesn't match either of 's3-eu-west-1.amazonaws.com', '*.s3-eu-west-1.amazonaws.com', 's3.eu-west-1.amazonaws.com', '*.s3.eu-west-1.amazonaws.com', 's3.dualstack.eu-west-1.amazonaws.com', '*.s3.dualstack.eu-west-1.amazonaws.com', '*.s3.amazonaws.com'

TLS is enabled. The requests version is 2.11.1.

As far as I know, it's correct that requests is complaining here, as a wildcard certificate doesn't cover an arbitrary depth of subdomains. The root cause here are the dots in the bucket name.

It would be good if one could configure tinys3 to not validate the server certificate. See http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions