-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Make quoteIfContainsWhite quote argument, so it can be safely passed to shell. #702
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
|
I'm not sure this is the correct solution. |
|
This might be better idea. However this will also require changing 27 places where it is used with intent of quoting shell command and will leave original one without any uses. |
|
I mean, if we leave By the way, #701 is related. |
|
I agree with zielmicha. In fact, I consider it a simple oversight of quoteIfContainsWhite. So please fix quoteIfContainsWhite and document its new behaviour and also document this change in web/news.txt. |
|
Added info to |
…to shell. On Windows put it in double quotes and escape double quotes using backslash. On Posix put it in single quotes and escape single quotes using '"'"'. This commit changes what quoteIfContainsWhite does, but before that change it was used incorrectly all over standard library, which caused security issues.
Make quoteIfContainsWhite quote argument, so it can be safely passed to shell.
|
This change seems to break |
|
Ok, I think it breaks the use of [] in arguments - I just had the same problem with compiler. I think I know what's wrong: argument parser must be using |
Reverts "Make quoteIfContainsWhite quote…". Refs #702.
Make quoteIfContainsWhite quote argument, so it can be safely passed to shell.
This reverts commit a54ba4c to avoid tool breakage. A different approach is being worked on nim-lang#730.
Reverts "Make quoteIfContainsWhite quote…". Refs nim-lang#702.
## Summary Internal refactor replacing `sem.newSymG` with `newSymGNode`, no change in actual behaviour ## Details This replaces the `newSymG`, which produced a symbol and effected errors. `newSymGNode` will return an `nkSym` node on succees and `nkError` if it failed. The `getDefNameSymOrRecover` proc can be used in conjunction in order to ensure progress can be made in the presence of errors. All call sites updated in such a fashion are now more ready to be converted to a more `nkError` aware style. --------- Co-authored-by: zerbina <100542850+zerbina@users.noreply.github.com>
On Windows put it in double quotes and escape double quotes using backslash.
On Posix put it in single quotes and escape single quotes using '"'"'.
This commit changes what quoteIfContainsWhite does, but before that change it was used incorrectly all over standard library, which caused security issues.