Skip to content

Conversation

@astoeckel
Copy link

@astoeckel astoeckel commented May 23, 2017

When using os.system (or really, just any kind of shell scripting), it is of utmost importance to properly escape individual arguments. For example

pytry-many echo 'Hello World'

must be substituted to

echo 'Hello World'

and not

echo Hello World

This commit fixes this problem by properly escaping individual arguments. Note that this also prevents accidental execution of commands, such as

pytry-many echo '`rm *`'

When using os.system (or really, just any kind of
shell scripting), it is of utmost importance to
properly escape individual arguments. For example

pytry echo 'Hello World'

must be substituted to

echo 'Hello World'

and not

echo Hello World

This commit fixes this problem by properly escaping
individual arguments. Note that this also prevents
accidental execution of commands, such as

pytry echo '`rm *`'
@astoeckel astoeckel changed the title Properly escape shell arguments Properly escape shell arguments in pytry-many May 23, 2017
@jgosmann jgosmann mentioned this pull request Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant