[Zope-Checkins] CVS: Zope/lib/python/RestrictedPython/tests - security_in_syntax.py:1.5

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


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

Modified Files:
	security_in_syntax.py 
Log Message:
Do not allow import-as to rebind "under names".


=== Zope/lib/python/RestrictedPython/tests/security_in_syntax.py 1.4 => 1.5 ===
--- Zope/lib/python/RestrictedPython/tests/security_in_syntax.py:1.4	Wed Aug 14 17:44:31 2002
+++ Zope/lib/python/RestrictedPython/tests/security_in_syntax.py	Wed Nov  5 19:37:27 2003
@@ -30,3 +30,13 @@
 
 def no_exec():
     exec 'q = 1'
+
+def no_yield():
+    yield 42
+
+def check_getattr_in_lambda(arg=lambda _getattr=(lambda ob, name: name):
+                                       _getattr):
+    42
+
+def import_as_bad_name():
+    import os as _leading_underscore




More information about the Zope-Checkins mailing list