Re: [Python-Dev] PEP 501 Shell Command Examples

2015-09-05 Thread Nikolaus Rath
On Sep 05 2015, Nick Coghlan wrote: > On 5 September 2015 at 12:36, Nikolaus Rath wrote: >> Hi Nick, >> >> You are giving >> >> runcommand(sh(i"cat {filename}")) >> >> as an example that avoids injection attacks. While this is true, I think >> this is still a terrible anti-pattern[1] that shoul

Re: [Python-Dev] PEP 501 Shell Command Examples

2015-09-05 Thread Nick Coghlan
On 5 September 2015 at 12:36, Nikolaus Rath wrote: > Hi Nick, > > You are giving > > runcommand(sh(i"cat {filename}")) > > as an example that avoids injection attacks. While this is true, I think > this is still a terrible anti-pattern[1] that should not be entombed in > a PEP as a positive exam

[Python-Dev] PEP 501 Shell Command Examples

2015-09-04 Thread Nikolaus Rath
Hi Nick, You are giving runcommand(sh(i"cat {filename}")) as an example that avoids injection attacks. While this is true, I think this is still a terrible anti-pattern[1] that should not be entombed in a PEP as a positive example. Could you consider removing it? (It doubly wastes resources