New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[URLEncode] Add safe argument to URLEncode script #26582
Merged
samuelFain
merged 20 commits into
master
from
feature/no-ref/url_encode-script-add-safe-argument
May 21, 2023
Merged
[URLEncode] Add safe argument to URLEncode script #26582
samuelFain
merged 20 commits into
master
from
feature/no-ref/url_encode-script-add-safe-argument
May 21, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
samuelFain
changed the title
Add safe argument to URLEncode script
[URLEncode] Add safe argument to URLEncode script
May 17, 2023
ShacharKidor
approved these changes
May 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! :)
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
fixes: https://jira-hq.paloaltonetworks.local/browse/XSUP-24291
Description
This PR is a fix to this issue, which utilizes urllib.parse.quote function's
safe
argument using a newsafe_character
script argument, that specifies additional ASCII characters that should not be quoted — its default value is "/".There is another new argument called
ignore_safe_character
which allows ignoring the safe character functionality (and encode the entire URL).Screenshots
Using the following URL as example input:
https://supportcases.paloaltonetworks.com/s/casedetail?Id=5004u00002ttOBkAAM
OOTB script configuration, gives the same results as the original script (not breaking BC):
Results:
ignore_safe_character argument set to 'true' ignores safe argument and encodes default special character '/':
Results:
Minimum version of Cortex XSOAR
Does it break backward compatibility?
Must have