Skip to content

[7.0.2] [external_files::AmazonS3] SignatureDoesNotMatch when enabling SSL with bucket name includes dot  #11386

@dotme-takase

Description

@dotme-takase

Hi, I'm using Amazon S3 and my bucket name includes dot (e.g. my.bucket).
I tried to add external storage mounts my S3 bucket.

Non-SSL works fine, but when I checked 'Enable SSL', mounting fails and icon turned to red.
Because I thought this caused by sub-subdomain problem, I set 'Hostname' in s3's default hostname with region like 's3-ap-northeast-1.amazonaws.com'.

But when the hostname includes region, S3Client couldn't find current directory, and [file_exists('.')] test fails.

So I modified function 'cleanKey' in /apps/files_external/lib/amazons3.php for workaround.

        private function cleanKey($path) {
                if ($path === '.') {
                        return ''; //workaround
                }
                return $path;
        }

Isn't there any other good solution?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions