Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34a2e08

Browse files
committed
Sabotage rexec.py. It is not safe since the new-style classes.
1 parent 2b0a3d3 commit 34a2e08

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/Bastion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def Bastion(object, filter = lambda name: name[:1] != '_',
9797
9898
"""
9999

100+
raise RuntimeError, "This code is not secure in Python 2.2 and 2.3"
101+
100102
# Note: we define *two* ad-hoc functions here, get1 and get2.
101103
# Both are intended to be called in the same way: get(name).
102104
# It is clear that the real work (getting the attribute

Lib/rexec.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ def __init__(self, hooks = None, verbose = 0):
180180
sent to standard output.
181181
182182
"""
183+
184+
raise RuntimeError, "This code is not secure in Python 2.2 and 2.3"
185+
183186
ihooks._Verbose.__init__(self, verbose)
184187
# XXX There's a circular reference here:
185188
self.hooks = hooks or RHooks(verbose)

0 commit comments

Comments
 (0)