[ZCM] [ZC] 1079/ 2 Comment "BaseRequest.py: infinite loops in traverse()"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Oct 10 13:15:55 EDT 2003


Issue #1079 Update (Comment) "BaseRequest.py: infinite loops in traverse()"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/1079

==============================================================
= Comment - Entry #2 by yuppie on Oct 10, 2003 1:15 pm

Checked in some tests and these changes on yuppie-collector1079-branch:
<http://cvs.zope.org/Zope/lib/python/ZPublisher/BaseRequest.py.diff?r1=1.51&r2=1.51.16.2>

I'm quite confident these changes don't break backwards compatibility. If there are no objections I'll merge them into Zope-2_6-branch, Zope-2_7-branch and HEAD next week.
________________________________________
= Request - Entry #1 by yuppie on Oct 9, 2003 12:17 pm

There are many ways to send traverse() into an infinite loop. I'd like to fix two of them:

1.) CMF HEAD's __before_publishing_traverse__ combined with Plone HEAD's __browser_default__ leads sometimes to an infinite loop. I believe 'method' has to be reset to the default default method after copying the modified default method to 'entry_name'.

2.) If __browser_default__ returns [None] or [''] as default_method, the loop also never ends. ( Earlier reported here: <http://collector.zope.org/Zope/708> )
Removing the line "if not entry_name: continue" fixes this and an error is raised instead. I can't see this line is useful in any way.

See also <http://mail.zope.org/pipermail/zope-cmf/2003-October/019498.html> and related discussion.

I'll write some basic tests for traversal() and let you know as soon as fix and tests are checked in on a branch.
==============================================================




More information about the Zope-Collector-Monitor mailing list