NullResource doesn't aq-wrap newly created object during PUT

Bug #143001 reported by Chris McDonough
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

If you upload something via DAV, a NullResource object is created to stand in for the to-be-created object. NullResource.PUT creates the object, and turns around and calls the newly created object's PUT method. But when it does that, it does not acquisition-wrap the newly-created object. Content PUT functions are apparently free to assume that "self" is already wrapped ala CMF's Image.py, which tries to do cataloging during a PUT. These will fail.

I'm not sure what the right thing to do is. It would be pretty trivial to aq-wrap the object in NullResource before calling its PUT, but is this right? Which piece of code is wrong, the content PUT function that assumes the object is in context, the factory function (which returns an unwrapped object), or the NullResource code?

Tags: bug zope
Revision history for this message
Tres Seaver (tseaver) wrote :

Wrapping the object before calling its PUT method was correct.

Fix released in 2.8.0.

Changed in zope2:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.