From 34a2e0858662fc314fe5d27048654eb74cee3148 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 6 Jan 2003 15:43:34 +0000 Subject: Sabotage rexec.py. It is not safe since the new-style classes. --- Lib/Bastion.py | 2 ++ Lib/rexec.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Lib/Bastion.py b/Lib/Bastion.py index 99990a2..ae2db74 100644 --- a/Lib/Bastion.py +++ b/Lib/Bastion.py @@ -97,6 +97,8 @@ def Bastion(object, filter = lambda name: name[:1] != '_', """ + raise RuntimeError, "This code is not secure in Python 2.2 and 2.3" + # Note: we define *two* ad-hoc functions here, get1 and get2. # Both are intended to be called in the same way: get(name). # It is clear that the real work (getting the attribute diff --git a/Lib/rexec.py b/Lib/rexec.py index b1a1427..f7aa640 100644 --- a/Lib/rexec.py +++ b/Lib/rexec.py @@ -180,6 +180,9 @@ class RExec(ihooks._Verbose): sent to standard output. """ + + raise RuntimeError, "This code is not secure in Python 2.2 and 2.3" + ihooks._Verbose.__init__(self, verbose) # XXX There's a circular reference here: self.hooks = hooks or RHooks(verbose) -- cgit v0.12