A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/066827.html below:

[Python-Dev] For sandboxing: alternative to crippling file()

[Python-Dev] For sandboxing: alternative to crippling file() [Python-Dev] For sandboxing: alternative to crippling file()Armin Rigo arigo at tunes.org
Fri Jun 30 19:52:05 CEST 2006
Hi Brett,

On Thu, Jun 29, 2006 at 11:48:36AM -0700, Brett Cannon wrote:
> 1) Is removing 'file' from the builtins dict in PyInterpreterState (and
> maybe some other things) going to be safe enough to sufficiently hide 'file'
> confidently (short of someone being stupid in their C extension module and
> exposing 'file' directly)?

No.

    >>> object.__subclasses__()
    [..., <type 'file'>]

Maybe this one won't work if __subclasses__ is forbidden, but in general
I think there *will* be a way to find this object.


A bientot,

Armin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4