[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container -
adding.py:1.19.2.5
Jim Fulton
jim at zope.com
Mon Sep 15 16:48:49 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv10942/src/zope/app/browser/container
Modified Files:
Tag: parentgeddon-branch
adding.py
Log Message:
Woo hoo. The tests all pass. Zope even runs. :)
=== Zope3/src/zope/app/browser/container/adding.py 1.19.2.4 => 1.19.2.5 ===
--- Zope3/src/zope/app/browser/container/adding.py:1.19.2.4 Mon Sep 15 14:12:26 2003
+++ Zope3/src/zope/app/browser/container/adding.py Mon Sep 15 16:48:18 2003
@@ -40,6 +40,8 @@
from zope.app.location import LocationProxy
import zope.security.checker
+from zope.proxy import removeAllProxies
+
class BasicAdding(BrowserView):
implements(IAdding, IPublishTraverse)
@@ -128,6 +130,13 @@
factory = LocationProxy(factory, self, type_name)
factory = zope.security.checker.ProxyFactory(factory)
content = factory()
+
+ # Can't store security proxies.
+ # Note that it is important to do this here, rather than
+ # in add, otherwise, someone might be able to trick add
+ # into unproxying an existing object,
+ content = removeAllProxies(content)
+
publish(self.context, ObjectCreatedEvent(content))
self.add(content)
More information about the Zope3-Checkins
mailing list