[Zope] [Ann] FTP patch: FTP access to objects relying on acquisition magic

Dieter Maurer dieter@handshake.de
Thu, 12 Jul 2001 23:55:57 +0200 (CEST)


You will find via

  URL:http://www.dieter.handshake.de/pyprojects/zope

an FTP patch to "OFS.ObjectManager".

The patch allows access to "Mirroring Folder"s (for sure)
and probably "LocalFS" and ZInstances derived from "ObjectManager"
via FTP.
It works by removing two acquisition checks.

  1.  The first one  prevented FTP access to objects when any of its ancestors
      was a wrapped object.

      I expect that this has been necessary for security reasons
      in old times. Now, with the much improved Zope 2.2 security,
      it could probably go away.

      ATTENTION: I am not sure about this!

  2.  The second check seems without any sense to me:

        The comment says, it checks whether "objectValues" was
	acquired. Such a check is non-sense as "ObjectManager"
	defines "objectValues" itself and never acquires it.

	The check was essentially:

	    self.objectValues() == REQUEST.PARENTS[1].objectValues()

	It raised an exception, because one of the objects
	was an "FSSession" that did not like to be compared
	with another object (because it was not initialized).

	I am sure, it is not a good idea to compare arbitrary
	objects with one another to check for acquisition
	properties.


Dieter