Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

Invalid signedUrl when filename contains parantheses #242

Open discretepackets opened 10 years ago

discretepackets commented 10 years ago

AWS S3 returns SignatureDoesNotMatch error because it asks for %28 and %29 in StringToSign but the Client.prototype.signedUrl function (https://github.com/LearnBoost/knox/blob/master/lib/client.js#L858) does not URL-encode "()" characters

domenic commented 10 years ago

Pull request (with test) definitely welcome

bendytree commented 10 years ago

I'm having the same problem with parenthesis.

FWIW, here's the fix I'm using: https://github.com/bendytree/knox/commit/244ed2a7b4806afd53de57b81bd4eb8419ee8d33

domenic commented 10 years ago

@bendytree would love for you to turn that into a pull request with a test :)