You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 ofAzureBlobsStorageDriver
withget_object_cdn_url
overloaded, and I've edited thestring_to_sign
's content with this: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
The text was updated successfully, but these errors were encountered: