[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

R. David Murray report at bugs.python.org
Tue Jun 8 13:42:37 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Unless we go the proliferating-interfaces route, it does represent a behavior change, and so if accepted would need to go through a deprecation cycle.  And if we did go that route, it would be a new feature.  So nothing can happen in 2.7, since it is already in the RC stage.

By the way, I did not suggest dropping the shell parameter, I argued against doing that.  The 'security' I referred to is that when you use a shell you are subject to shell-metacharacter-based attacks (and bugs!) if any elements of the command line come from user input and you don't sanitize them.  This problem doesn't exist with shell=False, which is why it is the default.

----------
versions:  -Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7839>
_______________________________________


More information about the Python-bugs-list mailing list