Skip to content
This repository was archived by the owner on Jan 15, 2020. It is now read-only.

Commit 975fc99

Browse files
committed
small fix to make this work with spaces in names
1 parent 21ee898 commit 975fc99

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cloud-cli/cloudapis/cloud.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ def _make_request_with_auth(self, command, requests):
7171
requests = zip(requests.keys(), requests.values())
7272
requests.sort(key=lambda x: str.lower(x[0]))
7373

74-
requestUrl = "&".join(["=".join([request[0], urllib.quote_plus(str(request[1]))]) for request in requests])
75-
hashStr = "&".join(["=".join([str.lower(request[0]), urllib.quote_plus(str.lower(str(request[1])))]) for request in requests])
74+
requestUrl = "&".join(["=".join([request[0], urllib.quote(str(request[1],""))]) for request in requests])
75+
hashStr = "&".join(["=".join([str.lower(request[0]), urllib.quote(str.lower(str(request[1])),"")]) for request in requests])
7676

77-
sig = urllib.quote_plus(base64.encodestring(hmac.new(self.securityKey, hashStr, hashlib.sha1).digest()).strip())
77+
sig = urllib.quote_plus(base64.encodestring(hmac.new(self.securityKey, str.lower(hashStr), hashlib.sha1).digest()).strip())
7878

7979
requestUrl += "&signature=%s"%sig
8080

0 commit comments

Comments
 (0)