[Zope-Checkins] CVS: Zope/lib/python/Products/PythonScripts - PythonScript.py:1.43.6.7

Tres Seaver tseaver at zope.com
Mon Jan 26 16:41:42 EST 2004


Update of /cvs-repository/Zope/lib/python/Products/PythonScripts
In directory cvs.zope.org:/tmp/cvs-serv608/lib/python/Products/PythonScripts

Modified Files:
      Tag: Zope-2_6-branch
	PythonScript.py 
Log Message:


  - Shared/DC/Scripts/Bindings.py:

    o Push script onto the execution stack before computing bindings, so
      that script proxy roles will be in effect during binding.

    o Harden "spacesuit" against Python / ZPublisher's willingness to use
      methods like __str__, __call__, and index_html.

  - Products/PythonScripts/PythonScript.py:

    o Remove code which pushes script onto the execution stack, since
      it is now done in the Binding base class.

  - AccessControl/tests/testBindings.py:

    o Make tests explicitly assert protection of "special" names;  also
      verify that proxy roles work during binding.


=== Zope/lib/python/Products/PythonScripts/PythonScript.py 1.43.6.6 => 1.43.6.7 ===
--- Zope/lib/python/Products/PythonScripts/PythonScript.py:1.43.6.6	Fri Jan 16 13:41:50 2004
+++ Zope/lib/python/Products/PythonScripts/PythonScript.py	Mon Jan 26 16:41:11 2004
@@ -304,17 +304,11 @@
             PythonScriptTracebackSupplement, self, -1)
         f = new.function(fcode, g, None, fadefs)
 
-        # Execute the function in a new security context.
-        security=getSecurityManager()
-        security.addContext(self)
-        try:
-            result = apply(f, args, kw)
-            if keyset is not None:
-                # Store the result in the cache.
-                self.ZCacheable_set(result, keywords=keyset)
-            return result
-        finally:
-            security.removeContext(self)
+        result = apply(f, args, kw)
+        if keyset is not None:
+            # Store the result in the cache.
+            self.ZCacheable_set(result, keywords=keyset)
+        return result
 
     def manage_haveProxy(self,r): return r in self._proxy_roles
 




More information about the Zope-Checkins mailing list