From 67eeb847e1071b33d6f5a05da9db2c052b010418 Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Sat, 7 Nov 2020 10:30:46 +0000 Subject: [PATCH] Add colon to safe characters This matches the output from generating a SAS token using Azure portal. --- azure-storage-blob/azure/storage/blob/sharedaccesssignature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-storage-blob/azure/storage/blob/sharedaccesssignature.py b/azure-storage-blob/azure/storage/blob/sharedaccesssignature.py index dfd47f1b..9f572895 100644 --- a/azure-storage-blob/azure/storage/blob/sharedaccesssignature.py +++ b/azure-storage-blob/azure/storage/blob/sharedaccesssignature.py @@ -271,5 +271,5 @@ def get_token(self): # a conscious decision was made to exclude the timestamp in the generated token # this is to avoid having two snapshot ids in the query parameters when the user appends the snapshot timestamp exclude = [_BlobQueryStringConstants.SIGNED_TIMESTAMP] - return '&'.join(['{0}={1}'.format(n, url_quote(v)) + return '&'.join(['{0}={1}'.format(n, url_quote(v, safe="/:")) for n, v in self.query_dict.items() if v is not None and n not in exclude])