Cediddi opened a new issue, #1805:
URL: https://github.com/apache/libcloud/issues/1805

   ## Summary
   
   I've been trying to generate a signed download link to a file with spaces in 
its name, let's call it `file name.txt`, and it has been failing to generate a 
token. While, If I use Azure's frontend, I can generate a token that works. I 
suspect the signature is calculated incorrectly.
   
   ## Detailed Information
   
   I had theorized that, azure don't `urlencode` the resource because it would 
be pointless if you are going to hash it. I've checked the official 
implementation and indeed they don't and use raw resource name when creating 
the signature. After that, I've created a subclass of `AzureBlobsStorageDriver` 
with `get_object_cdn_url` overloaded, and I've edited the `string_to_sign`'s 
content with this:
   
   ```diff
   + "/blob/{}{}".format(self.key, unquote(object_path)),
   - "/blob/{}{}".format(self.key, object_path),
   ```
   
   And indeed it works now for any file I tried.
   
   My Environment:
   python==3.10.5
   libcloud==3.6.0
   operating system is official python:3.10 from docker


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@libcloud.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to