If filename in path has spaces - signature becomes invalid
oaleynik opened this issue ยท 4 comments
oaleynik commented
Consider the following example:
var ImgixClient = require('imgix-core-js');
var client = new ImgixClient({
host: "example.com",
secureURLToken: "12345abcde",
secure: true
});
var url = client.buildURL("/a/b/c/image with spaces.jpg", {
fm: 'jpg',
dpr: 2,
w: 1500,
sharp: 15
});
The above outputs: https://example.com/a/b/c/image with spaces.jpg?fm=jpg&dpr=2&w=1500&sharp=15&ixlib=js-1.0.7&s=5d03453c163fb3c22722a1b7d3fc874a
when tool from web app outputs spaces URL encoded.
Request to the resulting URL returns 403 Invalid Signature. I needed to pin imgix-core-js version to 1.0.5 to avoid this.
jayeb commented
Augh, this method will be the death of me. I'll take a look at this sometime in the next few days and put together a fix. Thanks for the report, Oleg!
ericdeansanchez commented
๐ This issue has been resolved in version 0.3.0-beta.1 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐