[Zope-Checkins] CVS: Zope/lib/python/RestrictedPython - RestrictionMutator.py:1.10.68.1

Fred Drake cvs-admin at zope.org
Wed Nov 5 19:38:31 EST 2003


Update of /cvs-repository/Zope/lib/python/RestrictedPython
In directory cvs.zope.org:/tmp/cvs-serv25701/lib/python/RestrictedPython

Modified Files:
      Tag: Zope-2_7-branch
	RestrictionMutator.py 
Log Message:
Do not allow import-as to rebind "under names".


=== Zope/lib/python/RestrictedPython/RestrictionMutator.py 1.10 => 1.10.68.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:38:00 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