TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

signURL must URI-encode the Manta path #220

Closed jclulow closed 9 years ago

jclulow commented 9 years ago

The Client#signURL(options, callback) method requires options.path to be a Manta object path; e.g. "/jmc/public/tmp/file.txt" or "~~/stor/whatever.png". In order to transform expansion tokens like "~~", we pass the value of options.path through Client#path(path, skipEncode), but we request that the URI encoding step be skipped.

This is incorrect. Each component of the path must be URI-encoded, so that paths with characters that are not valid in a URI are presented correctly in the signed output.

jclulow commented 9 years ago

Fixed in 12f4c84, released as manta@1.5.0.