[ZCM] [ZC] 1752/ 4 Resolve "OFS.Image.tag acquires "alt" attribute"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed Apr 13 07:40:59 EDT 2005


Issue #1752 Update (Resolve) "OFS.Image.tag acquires "alt" attribute"
 Status Resolved, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1752

==============================================================
= Resolve - Entry #4 by tseaver on Apr 13, 2005 7:40 am

 Status: Pending => Resolved

Andreas and Sidnei fixed this problem for Zope 2.7.4:

  http://cvs.zope.org/Zope/lib/python/OFS/Attic/Image.py.diff?r1=1.145.2.7&r2=1.145.2.9

and on the head:

  http://svn.zope.org/Zope/trunk/lib/python/OFS/Image.py?rev=28320&r1=24764&r2=28320

The fix involved switching the code to compute the 'alt' element from an always-present 'alt' attribute (defined on the class).  The 'getattr' will thus never acquire anything.
________________________________________
= Comment - Entry #3 by longsleep on Apr 13, 2005 4:25 am

Does not seem so. The problem is still in svn head.
________________________________________
= Comment - Entry #2 by ajung on Apr 12, 2005 7:47 am

I thought we fixed this lately...or was this just for Plone?
________________________________________
= Request - Entry #1 by longsleep on Apr 12, 2005 7:41 am

When the OFS.Image.tag method is called without the "alt" parameter then an object with id "alt" is acquired through the acquisition chain with "getattr(image, 'alt', '')". Thats leads to big problems when the image object itself does not have this attribute. From my point of view this getattr call should happen on aq_base(image) to prevent acquireing folders or other objects. Same problem with the "title" parameter as well.
==============================================================



More information about the Zope-Collector-Monitor mailing list