[Zope-Checkins] CVS: Zope/lib/python/RestrictedPython -
RestrictionMutator.py:1.10.6.1
Fred Drake
cvs-admin at zope.org
Wed Nov 5 19:41:58 EST 2003
Update of /cvs-repository/Zope/lib/python/RestrictedPython
In directory cvs.zope.org:/tmp/cvs-serv26385/lib/python/RestrictedPython
Modified Files:
Tag: Zope-2_6-branch
RestrictionMutator.py
Log Message:
Do not allow import-as to rebind "under names".
=== Zope/lib/python/RestrictedPython/RestrictionMutator.py 1.10 => 1.10.6.1 ===
--- Zope/lib/python/RestrictedPython/RestrictionMutator.py:1.10 Wed Aug 14 17:44:31 2002
+++ Zope/lib/python/RestrictedPython/RestrictionMutator.py Wed Nov 5 19:41:28 2003
@@ -271,3 +271,10 @@
def visitAugAssign(self, node, walker):
node.node.in_aug_assign = 1
return walker.defaultVisitNode(node)
+
+ def visitImport(self, node, walker):
+ for name, asname in node.names:
+ self.checkName(node, name)
+ if asname:
+ self.checkName(node, asname)
+ return node
More information about the Zope-Checkins
mailing list