Log message for revision 68070: We have multiple versions of restrictedTraverse which need to be patched, sadly.
Changed: U Zope/branches/2.9/lib/python/Products/PageTemplates/Expressions.py -=- Modified: Zope/branches/2.9/lib/python/Products/PageTemplates/Expressions.py =================================================================== --- Zope/branches/2.9/lib/python/Products/PageTemplates/Expressions.py 2006-05-09 15:36:19 UTC (rev 68069) +++ Zope/branches/2.9/lib/python/Products/PageTemplates/Expressions.py 2006-05-09 20:03:11 UTC (rev 68070) @@ -294,7 +294,19 @@ container = o.im_self elif (has(aq_base(object), name) and get(object, name) == o): container = object - if not validate(object, container, name, o): + try: + validated = validate(object, container, name, o) + except Unauthorized: + # If next is a simple unwrapped property, it's + # parentage is indeterminate, but it may have been + # acquired safely. In this case validate will + # raise an error, and we can explicitly check that + # our value was acquired safely. + validated = 0 + if container is None and \ + guarded_getattr(object, name, M) is o: + validated = 1 + if not validated: raise Unauthorized, name else: # Try an attribute. _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins