-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-70312: Add note for shlex.quote() #13333
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
Conversation
The :func:`quote` function will not quote shell keywords. | ||
(like echo, done, while, etc.) |
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.
I think that saying it doesn't quote shell keywords makes one wonder why shell keywords specifically. It might be better to say something like this instead (source), but I'll defer to others if this is too much detail:
The :func:`quote` function will not quote shell keywords. | |
(like echo, done, while, etc.) | |
The :func:`quote` function will not quote any ASCII word characters, which | |
include shell keywords like ``echo``, ``done``, ``while``, etc. |
If add such note (I am not sure that it should be added at all), I think that the warning few paragraphs above is a better place. |
I think Murray's suggestion in #70312 (comment) is a better approach. Suggesting to close this PR and create a new one based on that suggestion. |
Thanks @Windsooon and reviewers. I'm going to go ahead and close this stale PR that has been marked pending since February. The existing examples illustrate the advantage of using quote to avoid injection. |
Uh oh!
There was an error while loading. Please reload this page.