From a9ba5d2958a164c25d97dc36e11feba8d6752585 Mon Sep 17 00:00:00 2001 From: Justin Newman Date: Fri, 25 Jun 2021 17:31:57 -0400 Subject: [PATCH] Support for *.s3..amazonaws.com URLs, in addition to *.s3-.amazonaws.com and *.s3.amazonaws.com --- code/Helper/S3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Helper/S3.php b/code/Helper/S3.php index 975bdfb..789f49b 100644 --- a/code/Helper/S3.php +++ b/code/Helper/S3.php @@ -20,7 +20,7 @@ public function generateSecureUrl($url) { } protected function _tryBucketSubdomain($url, $secret, $expires) { - preg_match_all("/^https?:\/\/(.*)\.s3[\w-]*\.amazonaws\.com\/(.*)$/", $url, $matches); + preg_match_all("/^https?:\/\/(.*)\.s3[\w.-]*\.amazonaws\.com\/(.*)$/", $url, $matches); if ($matches && count($matches) > 0 && count($matches[0]) > 0) { list($full_url, $bucket, $filename) = $matches;