GitHub user phillipkent opened a pull request:
https://github.com/apache/cloudstack-docs/pull/17
Add note in dev.rst about use of the safe option in urllib.quote_plus()
There is a mismatch between the URL encoding behavior of Python and
CloudStack's internal URL encoder (Java URLEncoder): Python encodes *
(asterisk) characters, while Java does not. When an API call contains a *
character, an authentication failure will occur because the computed signatures
will not agree.
The solution is to add the option "safe = '*'" to Python's
urllib.quote_plus().
NOTE: I can only test this problem on CloudStack version 4.3.2 and I don't
have access to later versions where the behavior might be different. But the
issue was confirmed by @bhaisaab for Cloudmonkey (see
https://github.com/apache/cloudstack-cloudmonkey/pull/11).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/phillipkent/cloudstack-docs
dev_add_urllib_safe_option
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack-docs/pull/17.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17
----
commit 152589eb15ec87167472b3d1f340445d87e66a7a
Author: Phillip Kent <[email protected]>
Date: 2016-04-08T12:30:28Z
Add note in dev.rst about use of the safe option in Python
urllib.quote_plus()
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---