[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
DTML.py:1.10.6.1 ZopeGuards.py:1.12.4.4
Tres Seaver
tseaver at zope.com
Fri Jan 9 13:51:06 EST 2004
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv18778/lib/python/AccessControl
Modified Files:
Tag: Zope-2_6-branch
DTML.py ZopeGuards.py
Log Message:
- Collector #1169: DTML misses new builtins
o Ensure that DTML has access to the full range of "safe" builtins
provided by ZopeGuards.
o Force ZopeGuards' version of safe_builtins into the version kept by
RestrictedPython.Guards.
=== Zope/lib/python/AccessControl/DTML.py 1.10 => 1.10.6.1 ===
--- Zope/lib/python/AccessControl/DTML.py:1.10 Wed Aug 14 17:29:07 2002
+++ Zope/lib/python/AccessControl/DTML.py Fri Jan 9 13:51:01 2004
@@ -19,7 +19,7 @@
import SecurityManagement, string, math, whrandom, random
import DocumentTemplate.sequence
-from ZopeGuards import guarded_getattr, guarded_getitem
+from ZopeGuards import guarded_getattr, guarded_getitem, safe_builtins
class RestrictedDTML:
'''
@@ -127,3 +127,4 @@
return r
DT_Util.TemplateDict.__dict__.update(DTMLSecurityAPI.__dict__)
+DT_Util.TemplateDict.__dict__.update(safe_builtins)
=== Zope/lib/python/AccessControl/ZopeGuards.py 1.12.4.3 => 1.12.4.4 ===
--- Zope/lib/python/AccessControl/ZopeGuards.py:1.12.4.3 Thu Jan 8 15:12:07 2004
+++ Zope/lib/python/AccessControl/ZopeGuards.py Fri Jan 9 13:51:01 2004
@@ -27,7 +27,7 @@
_marker = [] # Create a new marker object.
-safe_builtins = safe_builtins.copy()
+RP_safe_builtins, safe_builtins = safe_builtins, safe_builtins.copy()
safe_builtins.update(utility_builtins)
try:
@@ -409,3 +409,7 @@
get_safe_globals = _safe_globals.copy
+#
+# Force our version of 'safe_builtins' into RestrctedPython.Guards.
+#
+RP_safe_builtins.update(safe_builtins)
More information about the Zope-Checkins
mailing list