Issue when generating a url using sas token. Method file_service.make_file_url()
See original GitHub issueWhich service(blob, file, queue) does this issue concern?
File share
Which version of the SDK was used? Please provide the output of pip freeze
.
azure-storage-file==2.0.1 azure-storage-common==2.0.0
What problem was encountered?
When genrating a url using the method make_file_url
passing a sas token, the generated url has two query strings (‘?’) instead of one.
The SaS Token generated on Azure portal starts with a query string.
Have you found a mitigation/solution?
Yes. Remove the query string (‘?’) at line 233.
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Grant limited access to Azure Storage resources using shared ...
The SAS token is not tracked by Azure Storage in any way. You can create an unlimited number of SAS tokens on the...
Read more >How to Create a Azure Blob Shared Access Signature (SAS ...
The script below will create an Azure Blob SAS Token with the Azure ... base URL, the DDP_RESOURCE_URL is appended to the base...
Read more >Problem Generating Azure ADLS Gen2 SAS Token for ...
I believe the issue is that you are using AccountSasPermissions instead of ContainerSasPermissions . Can you try by changing the following ...
Read more >Storage Account SAS Tokens, Access Keys, And Connection ...
Which SAS Type To Use? Account SAS Token. Parameters Of listAccountSas Function; Generating an Account SAS Token In Azure Bicep. Service SAS ...
Read more >Avoiding "AuthorizationFailed" error when hand-crafting ...
The way you create a SAS Token is that you create a StringToSign and sign this with your account key to get a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @GeisaFaustino Thanks for catching this bug. You are totally right that ideally the method make_file_url should work with both SAS token and the SAS token generated the API. This pull request https://github.com/Azure/azure-storage-python/pull/611 is to fix that.
@xiafu-msft we should make a fix, where we check whether the sas token starts with a ‘?’; if not, add a ‘?’.