-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
document correct usage for shell_escape_wincmd #38513
Conversation
c40ebcc
to
1c49620
Compare
I'm not yet convinced this sentence is true. But I've also not even understood yet the precise application context talked about here (e.g., who will interpret the surrounding double-quote pair?). Could you please provide me with a complete Julia script that demonstrates the use described in this sentence? That should then allow me to try to falsify the safety claim made in this sentence, by trying to form an input string that will not be passed verbatim to the application called by your example script (e.g. |
Could we also list as one (perhaps even the first!) use of this function:
? That was my not only initial motivation to write it: I also still think this use case is much easier to understand than any of the nested calls to |
Here's how your naive attempt can be hijacked:
What?? Oh, if we consult the documentation carefully, we discover the command parsed here was instead How to fix? Always use
This should be irrelevant in this sentence, if correctly implemented. The key phrase is "passed to cmd.exe", and any other program mentioned is a distraction, as their existence must be handled elsewhere.
This flag is typically mandatory when using this function, to disable the C-standard behaviors otherwise employed. |
Could we perhaps include:
@vtjnash Does this concrete example script demonstrate the use case you wanted to have covered? |
700a308
to
d8ceb86
Compare
Note that most resources online are wrong, and even `cmd /c help cmd` prints the wrong list, so it is important to be clear here about the actual guarantees this function can afford. Refs #38352
d8ceb86
to
7d428ea
Compare
Doesn't the new text give the (incorrect) impression that including |
Do you specifically mean this line: https://github.com/JuliaLang/julia/pull/38513/files#diff-92d17ed4c3ab24cca65d43dd11a040f4f8e96378384fa143e2d418c5b07656d3R277 |
I could see how that's unclear which clause the 'else' connects to, though I feel the surrounding text is clear that '%' does not throw an error. |
Adds the documentation missing from #38352 on the purpose of this function.
Note that most resources online are wrong, and even
cmd /c help cmd
prints the wrong list,so it is important to be clear here about the actual guarantees this function can afford.