download_strategy: correct S3 url regex

This commit is contained in:
Xu Cheng 2016-03-06 13:28:31 +08:00
parent 9f96e41b40
commit c540343903

View File

@ -451,7 +451,7 @@ class S3DownloadStrategy < CurlDownloadStrategy
raise
end
if @url !~ %r{^https?://+([^.].+).s3.amazonaws.com/+(.+)$}
if @url !~ %r{^https?://([^.].*)\.s3\.amazonaws\.com/(.+)$}
raise "Bad S3 URL: " + @url
end
bucket = $1