Update of /cvs-repository/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv30274/lib/python/Products/PageTemplates
Modified Files: Tag: Zope-2_7-branch ZRPythonExpr.py Log Message: - Collector #1914: Harden 'call_with_ns' (in 'Products.PageTemplates.ZRPythonExpr') against namespaces from other callers than page templates. === Products/PageTemplates/ZRPythonExpr.py 1.10.68.1 => 1.10.68.2 === --- Products/PageTemplates/ZRPythonExpr.py:1.10.68.1 Thu Jan 8 18:33:49 2004 +++ Products/PageTemplates/ZRPythonExpr.py Tue Oct 11 11:00:36 2005 @@ -62,8 +62,11 @@ def call_with_ns(f, ns, arg=1): td = Rtd() - td.this = ns['here'] - td._push(ns['request']) + # prefer 'context' to 'here'; fall back to 'None' + this = ns.get('context', ns.get('here')) + td.this = this + request = ns.get('request', {}) + td._push(request) td._push(InstanceDict(td.this, td)) td._push(ns) try: _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins