mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	small fix to make this work with spaces in names
This commit is contained in:
		
							parent
							
								
									21ee8982a1
								
							
						
					
					
						commit
						975fc997f7
					
				| @ -71,10 +71,10 @@ class CloudAPI: | |||||||
|         requests = zip(requests.keys(), requests.values()) |         requests = zip(requests.keys(), requests.values()) | ||||||
|         requests.sort(key=lambda x: str.lower(x[0])) |         requests.sort(key=lambda x: str.lower(x[0])) | ||||||
| 
 | 
 | ||||||
|         requestUrl = "&".join(["=".join([request[0], urllib.quote_plus(str(request[1]))]) for request in requests]) |         requestUrl = "&".join(["=".join([request[0], urllib.quote(str(request[1],""))]) for request in requests]) | ||||||
|         hashStr = "&".join(["=".join([str.lower(request[0]), urllib.quote_plus(str.lower(str(request[1])))]) for request in requests]) |         hashStr = "&".join(["=".join([str.lower(request[0]), urllib.quote(str.lower(str(request[1])),"")]) for request in requests]) | ||||||
| 
 | 
 | ||||||
|         sig = urllib.quote_plus(base64.encodestring(hmac.new(self.securityKey, hashStr, hashlib.sha1).digest()).strip()) |         sig = urllib.quote_plus(base64.encodestring(hmac.new(self.securityKey, str.lower(hashStr), hashlib.sha1).digest()).strip()) | ||||||
| 
 | 
 | ||||||
|         requestUrl += "&signature=%s"%sig |         requestUrl += "&signature=%s"%sig | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user