Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upQuote/Escape all URL placeholders #532
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
codecov-io
commented
Oct 10, 2019
•
Codecov Report
@@ Coverage Diff @@
## develop #532 +/- ##
===========================================
+ Coverage 82.84% 82.85% +<.01%
===========================================
Files 54 54
Lines 2949 2968 +19
===========================================
+ Hits 2443 2459 +16
- Misses 506 509 +3
Continue to review full report at Codecov.
|
This looks like a great addition. Also good callout on the breaking change! We can make sure to call that out in the changelog notes on the off chance it would break someone's existing usage. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
llamasoft commentedOct 10, 2019
This MR fixes issue #528.
A new utility function,
utils.format_url
, has been added which can be used like a string's.format
method but it appliesurllib.parse.quote
to all string-like placeholders. Allapi_path
values that used.format
have been updated to use the new function instead. For Python 2/3 compatibility it usessix
library which is now included in the requirements file. All requirements files have been updated as tox fails when the requirements contain library version differences.It should be noted that
urllib.parse.quote
doesn't escape forward slashes. I was extremely happy to find out that Vault handles all forward slashes correctly, even in cases where it might be confusing to a human. This means that no special handling is required for any placeholders regardless of the number of URL segments they should represent.I also fixed a few minor formatting inconsistencies in api/secrets_engines/pki.py
and removed an unused placeholder in
delete_root`.Lastly, there is a potentially breaking change in
api/auth_methods/aws.py
functionplace_role_tags_in_blacklist
where the misspelled argument "mount_pont" has been corrected.