Nick Coghlan <ncogh...@gmail.com> added the comment:

We can only protect people from themselves so much - "shell=True" is invaluable 
when you actually want to invoke the shell, and the shell has much better tools 
for process invocation and pipeline processing than Python does (since shells 
are, in effect, domain specific languages dedicated to those tasks).

If someone is blindly copying and pasting code from the internet, then shell 
injection attacks are likely to be the *least* of the security problems in 
anything they're building.

The point of the examples is to demonstrate the return code handling and using 
the shell is the easiest way to do that. I'll add a note to the docstrings to 
be aware of the security issues with the parameter, though.

As far as the keyword arguments go, no, I can't just drop the bare '*' from the 
abbreviated signature, because that would be making claims about the signature 
that are just plain *wrong* (there are other positional arguments that appear 
before 'stdin'). I'll add a note explaining that point somewhere in the 2.7 
version, though.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to