Nick Coghlan added the comment:

Right, Larry and I had a fairly long discussion about this idea at the sprints, 
and I was satisfied that all the cases where he's proposing to use this are 
safe: in order to exploit them you need to be able to set __text_signature__ on 
arbitrary objects, and if an attacker can do that, you've already lost control 
of the process.

However, a natural future extension is to expose this as a public alternative 
constructor for Signature objects, and for that, the fact that it ultimately 
calls eval() under the hood presents more of a security risk. The 
"trusted=False" default on _signature_fromstr allows the function to be used 
safely on untrusted data, while allowing additional flexibility when you *do* 
trust the data you're evaluating.

----------

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

Reply via email to