adonisjs / drive-s3

S3 driver for AdonisJS drive
MIT License
21 stars 9 forks source link

Potential URL Concatenation Issue in getUrl Method #25

Open martinholecekmax opened 8 months ago

martinholecekmax commented 8 months ago

https://github.com/adonisjs/drive-s3/blob/96f2727730baff2f47bfc7cce8001b3563d75528/src/Drivers/S3.ts#L339

There appears to be a potential issue in the getUrl method of the S3Driver class. The method concatenates this.cachedBucketUrl and location directly without a slash in between, potentially leading to malformed URLs.

RomainLanz commented 7 months ago

Hey @martinholecekmax! 👋🏻

I believe we could use the URL class to properly append the path. Do you want to make a PR?