dadi / cdn

CDN is a Just-in-time asset manipulation and delivery application, providing a complete content distribution/delivery solution

Home Page:https://dadi.cloud/en/cdn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong bucket name used when image contains the string `s3`

fra967 opened this issue · comments

CDN version 1.13.3

If an image filename contains the s3 string and CDN is fetching images from a S3 bucket, the name of the bucket is wrongly changed and it results in a 403 error

This is probably due to the check made on s3 (instead of /s3) in these lines
https://github.com/dadi/cdn/blob/v1.13.3/dadi/lib/storage/s3.js#L25
https://github.com/dadi/cdn/blob/v1.13.3/dadi/lib/storage/s3.js#L35