[Bf-committers] Python status

Willian Padovani Germano bf-committers@blender.org
19 May 2003 03:03:09 -0300


On Sun, 2003-05-18 at 07:10, Ton Roosendaal wrote:
> Hi Michel,
Hi Michel : ), please let me add .2 cents before your answer.

> Great work! And my compliments for Willian too!
Thanks, it's been a pleasure : ).

> About security issues, here's what I thought of in the past:
> 
> Python will get two security modes:
> 
> 1. Sandboxed.
> Only access is allowed to write to a default data space at the disk  
> (for example $HOME/.blender/python/). Executing commands and importing  
> is limited to the sandboxed area as well. (is that possible?)

That's what we're trying to find out.  Povray 3.5 allows users to choose
this behavior, but their interpreter is coded by themselves.  With
Python we're yet to find how (if possible) to do it.  That rexec module
mentioned was deemed unsafe even by Guido van Rossum himself and won't
be part of the next Python releases, as explained here:

http://www.amk.ca/python/howto/rexec/

> (...) If a python script  
> needs to export data, it can safely use the Blender fileselect for  
> that, or just write to the Sandbox area.

It isn't safe by itself (without a Sandbox area), since a script can
fake: simply ignore the filename returned by fileselect and use some
other.

--
Willian, wgermano@ig.com.br