Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix salt-cloud ec2 requests containing spaces.
salt-cloud receives an error when trying to create an EC2 instance when any number of argument values contain a space. This happens because salt-cloud is incorrectly building the url string when calculating the signature. AWS signature algorithm #2 requires that spaces be encoded using %20, however python's urlencode method replaces them with a +. The easy fix is to just search and replace in the encoded string. I encountered this myself with a security group with a space in it. This was reported in issue #10181 #10181 The error looks like this: someinstancename: ---------- Errors: ---------- Error: ---------- Code: SignatureDoesNotMatch Message: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. RequestID: 12345678-9abc-def0-1234-56789abcdef0
- Loading branch information