Summary
shell egg doesn't properly quote command lines
Metadata
- Id: c8c702e574859138874228f81925c8cf5c281512
- Trac id: 496
- Type: defect
- Reporter: syn
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: wontfix
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-02-09 13:06:10 UTC
- Keywords: egg shell
Attachments
- c8c702e574859138874228f81925c8cf5c281512/attachments/shell-escaping.patch
Description
The shell egg doesn't properly quote command lines. For example
(run ("grep" "foo bar"))
will fail with
grep: bar: No such file or directory
i.e. it passes the single argument as two arguments. The attached patch fixes that by using posix process-run with a separate argument list and additionally cleans up dependencies and exports.
Changes and comments
[2011-02-09 13:06:34 UTC] syn attached shell-escaping.patch (description=#f)
[2011-02-13 14:10:00 UTC] felix wrote:
But does this allow argument expansion usually done by the shell?
[2011-02-13 14:59:51 UTC] syn wrote:
I'm not sure what you mean with argument expansion. Can you give an example?
[2011-02-20 15:42:15 UTC] felix wrote:
Replying to syn: > I'm not sure what you mean with argument expansion. Can you give an example?
Is this passed to the shell or is the process called directly. I assume the latter, which would not be right. The `run` command does no automatic escaping, use `qs` for that. In other words, it is known and intended to not escape. Perhaps this should be documented more thoroughly.
[2011-02-25 08:48:22 UTC] felix changed status from new to closed
[2011-02-25 08:48:22 UTC] felix set resolution to wontfix
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted