Hi all, I don't recall any information being provided to the CMF developers about CMF fixes in the most recent Plone Hotfix:
http://plone.org/products/plone-hotfix/releases/20121106 For example, there's a monkey patch to make sure getToolByName only returns valid tool objects and nothing else, see the attached file. I'm not sure if there's an oversight of not forwarding this information to us or if it was determined this fix is not relevant for the CMF. Would any list member who also works on Plone have an insight? Thanks! jens
from Products.CMFCore import utils
try:
from Products.CMFPlone.FactoryTool import FauxArchetypeTool
HAS_FAT = True
except ImportError:
FauxArchetypeTool = None
HAS_FAT = False
from persistent.interfaces import IPersistent
try:
from OFS.interfaces import IItem
except ImportError:
IItem = IPersistent
try:
tool_registry = utils._tool_interface_registry
except AttributeError:
tool_registry = {}
gtbn = utils.getToolByName
def wrapped_getToolByName(obj, name, default=utils._marker):
result = gtbn(obj, name, default)
if IPersistent.providedBy(result) or \
IItem.providedBy(result) or \
name in tool_registry or \
(HAS_FAT and isinstance(result, FauxArchetypeTool)) or \
result is utils._marker or \
result is default:
return result
else:
raise TypeError("Object found is not a portal tool (%s)" % (name,))
return result
utils.getToolByName = wrapped_getToolByName
try:
import Products.CMFPlone.utils
Products.CMFPlone.utils.getToolByName = wrapped_getToolByName
except ImportError:
pass
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Zope-CMF maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
