<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.2">
</HEAD>
<BODY>
Em Qui, 2008-08-28 &#224;s 18:45 +0200, Mathias Panzenb&#246;ck escreveu:
<BLOCKQUOTE TYPE=CITE>
<PRE>
I'm no Python guru. I write a lot of very small Python scripts, but do no
embedding. However I still want to point out the following:
What not sandboxed things are possible through the blender API?
E.g. you could Load a Textfile using Blender.Text.Load.
Using this you could spy on a user. And with the urlib or webbrowser modules
you could send back this informations (e.g. using a querystring). In a sandbox
you have to forbid network access anyway. I don't know if access to Blender.Text
would make sense from within a game anyway, so you could forbid it.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
Access to the entire Blender package is already forbiden from within the game engine. So, that's not really an issue for now.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
I don't know, is it somehow possible to write a file using blenders API? (e.g.
through unpacked data) If so, you have to forbid that, too. What's up with
library access to other .blend files (e.g. like /tmp/quit.blend)?
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
I'm not sure, but as the modules exported to the Python scripting aren't focused on creating files I don't think it's possible now.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
Anyway, to call the sandbox done you should review all modules that are
accessible from within it. Some modules in the standard lib have problems,
where they are exporting modules they have imported (e.g. the forgot to use
__all__) so it might be possible to import untrusted modules through some
trusted ones.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
I see. That might cause some problems. Only Python gurus and lots of testing can tell us that and that will be forever a source of issues, as python is evolving and new packages are being written while sandboxing is not one of their priorities.<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
I think this could be interesting for other projects, too. It would be great
if you would document what need to be done to make a sandboxed python in the
wiki.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
Yeah! Agreed. Maybe I'll dedicate some of my time on this task - even thought I'm not a python neither a blender expert.<BR>
<BR>
<BR>
Regards,<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<IMG SRC="cid:1219944803.8827.0.camel@leibniz.escritorio.ydeabr.com" ALIGN="bottom" ALT="Ydea Desenvolvimento de Software LTDA." BORDER="0"><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Marcelo Cora&#231;a de Freitas </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Gerente de TI </FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Ydea Desenvolvimento de Software LTDA. </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Av. Adolfo Pinheiro, 2338 - Alto da Boa Vista </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">CEP.:04734-004 - S&#227;o Paulo - SP </FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#0090ff">Tel.: 55-11-5523-0333 </FONT></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>