[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/Scripts -
Bindings.py:1.9.6.1
Tres Seaver
tseaver at zope.com
Thu Jan 8 15:19:35 EST 2004
Update of /cvs-repository/Zope/lib/python/Shared/DC/Scripts
In directory cvs.zope.org:/tmp/cvs-serv31064/lib/python/Shared/DC/Scripts
Modified Files:
Tag: Zope-2_6-branch
Bindings.py
Log Message:
- Automatic bindings for scripts (e.g, 'context', 'container') were not
being validated before use.
=== Zope/lib/python/Shared/DC/Scripts/Bindings.py 1.9 => 1.9.6.1 ===
--- Zope/lib/python/Shared/DC/Scripts/Bindings.py:1.9 Mon Aug 19 09:40:42 2002
+++ Zope/lib/python/Shared/DC/Scripts/Bindings.py Thu Jan 8 15:19:34 2004
@@ -14,6 +14,7 @@
__version__='$Revision$'[11:-2]
import Globals
+from AccessControl import getSecurityManager
from Persistence import Persistent
from string import join, strip
import re
@@ -217,6 +218,10 @@
while 1:
self = self.aq_parent
if not getattr(self, '_is_wrapperish', None):
+ parent = getattr(self, 'aq_parent', None)
+ inner = getattr(self, 'aq_inner', None)
+ container = getattr(inner, 'aq_parent', None)
+ getSecurityManager().validate(parent, container, '', self)
return self
def _getContainer(self):
@@ -224,6 +229,10 @@
while 1:
self = self.aq_inner.aq_parent
if not getattr(self, '_is_wrapperish', None):
+ parent = getattr(self, 'aq_parent', None)
+ inner = getattr(self, 'aq_inner', None)
+ container = getattr(inner, 'aq_parent', None)
+ getSecurityManager().validate(parent, container, '', self)
return self
def _getTraverseSubpath(self):
More information about the Zope-Checkins
mailing list