On Wed, Mar 5, 2014 at 1:31 PM, Chris Angelico firstname.lastname@example.org wrote:
On Thu, Mar 6, 2014 at 8:20 AM, David Mertz email@example.com wrote:
The literal hardly saves you from injection attacks. I could write this
under the proposed idea:
foo = get_string_from_attacker() a = $(foo) b = a.eval()
Now one can say "don't do that!" ... but that advice applies just as
That'll just be like doing:
b = foo
So it's still safe. That's the point.
Doh! You are right. The literal does make it somewhat harder to shoot yourself in the foot with code injection, I had a thinko there. Still, advice in the docs not to do 'compile(untrusted_string, ...)' feels like it pretty much does what we actually need.