Re: [Python-ideas] shutil.run no security thread

Ok, let's separately discuss shutil.run() added value without touching security at all (subj changed). Is it ok? Is it nice idea? Would it be included in stdlib in an ideal world where security implications doesn't matter? -- anatoly t. On Tue, May 22, 2012 at 11:30 PM, Mike Meyer <mwm@mired.org> wrote:

On Wed, May 23, 2012 at 1:47 AM, anatoly techtonik <techtonik@gmail.com> wrote:
I hope not, because it'd still have all the /usability/ pitfalls associated with shell interpolation (and the consequent need to escape command arguments). Consider: chris@MBP ~ $ mkdir foo && cd foo chris@MBP foo $ ls chris@MBP foo $ touch '~' # the horror chris@MBP foo $ touch '$EDITOR' # you have a sick mind chris@MBP foo $ ls -l # verify the devious plot total 0 -rw-r--r-- 1 chris staff 0 May 23 02:11 $EDITOR -rw-r--r-- 1 chris staff 0 May 23 02:11 ~ chris@MBP foo $ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
(Less contrived examples left as an exercise for the reader.) Also, this isn't shell-specific, but it still should be made easier to handle properly: What about a file named "--help"? Cheers, Chris -- Sadly, no, `ed` isn't really my editor. http://rebertia.com P.S. Please avoid top-posting in the future.

On Wed, May 23, 2012 at 6:47 PM, anatoly techtonik <techtonik@gmail.com> wrote:
Sure. That world is called PHP (or C, for that matter). We *care* about security implications, and trying to be secure by default is part of that. Usability isn't everything, and it's OK if software development is sometimes hard. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

On Wed, May 23, 2012 at 1:47 AM, anatoly techtonik <techtonik@gmail.com> wrote:
I hope not, because it'd still have all the /usability/ pitfalls associated with shell interpolation (and the consequent need to escape command arguments). Consider: chris@MBP ~ $ mkdir foo && cd foo chris@MBP foo $ ls chris@MBP foo $ touch '~' # the horror chris@MBP foo $ touch '$EDITOR' # you have a sick mind chris@MBP foo $ ls -l # verify the devious plot total 0 -rw-r--r-- 1 chris staff 0 May 23 02:11 $EDITOR -rw-r--r-- 1 chris staff 0 May 23 02:11 ~ chris@MBP foo $ python Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
(Less contrived examples left as an exercise for the reader.) Also, this isn't shell-specific, but it still should be made easier to handle properly: What about a file named "--help"? Cheers, Chris -- Sadly, no, `ed` isn't really my editor. http://rebertia.com P.S. Please avoid top-posting in the future.

On Wed, May 23, 2012 at 6:47 PM, anatoly techtonik <techtonik@gmail.com> wrote:
Sure. That world is called PHP (or C, for that matter). We *care* about security implications, and trying to be secure by default is part of that. Usability isn't everything, and it's OK if software development is sometimes hard. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (3)
-
anatoly techtonik
-
Chris Rebert
-
Nick Coghlan