On 7/11/2020 11:17 PM, Greg Ewing wrote:
> On 12/07/20 1:01 pm, Edwin Zimmerman wrote:
>> As I see it, the unsafe callables (eval, exec, os.system, etc) are generally 
>> functions, and safe ones(int, list, dict) are generally classes, though 
>> there certainly would be exceptions.
>
> Where security is concerned, "there certainly would be exceptions"
> are not words you want to hear.
>
Agreed, that is why pickle should almost never be used.  In the past, I have 
looked long and hard at using pickle in my own projects, but was always turned 
away because of its potential for security issues.  I've thought for years that 
pickle is a major security foot gun, and I think that not allowing this by 
default:
>>> pickle.loads(b"cos\nsystem\n(S'echo hello world'\ntR.")
would be a step in the right direction.

--Edwin
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NMNC3SIZHU4OKOSV7RWZYBDH7O3JRZ5I/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to