Description
Table of contents mixed with pages that include /SubPage cause infinite recursion.
Steps to reproduce
create this page:
[[TableOfContents]] This page include its /SubPage: [[Include(/SubPage)]]
Now click on the sub page link and create this page:
This page include its /SubPage: [[Include(/SubPage)]]
And try to click "Show Parent"...
Try on this wiki: /SubPage
Details
main--patch-925
<!-- The above is a description of an error in a Python program, formatted
for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:
Traceback (most recent call last):
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/request.py", line 1045, in run
self.page.send_page(self, count_hit=1)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 1183, in send_page
format_args=pi_formatargs, do_cache=do_cache)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 1265, in send_page_content
self.execute(request, parser, code)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 1290, in execute
exec code
File "IncludeSubPageRecursion", line 7, in ?
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/formatter/base.py", line 231, in macro
return macro_obj.execute(name, args)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/wikimacro.py", line 101, in execute
return macro(self, args)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 160, in execute
return toc.run()
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 73, in run
self.macro.formatter.page.page_name)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 111, in process_lines
self.process_lines(inc_page_lines, inc_pagename)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 111, in process_lines
[snip snip snip]
self.process_lines(inc_page_lines, inc_pagename)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 111, in process_lines
self.process_lines(inc_page_lines, inc_pagename)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 111, in process_lines
self.process_lines(inc_page_lines, inc_pagename)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 109, in process_lines
inc_page_lines = inc_page_lines + self.IncludeMacro(self.macro, match.group(1), called_by_toc=1)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/TableOfContents.py", line 69, in IncludeMacro
return self.pre_re.sub('',apply(self.include_macro, args, kwargs)).split('\n')
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/macro/Include.py", line 102, in execute
if not request.user.may.read(inc_name):
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/security.py", line 52, in <lambda>
return lambda pagename, Page=Page, request=request, attr=attr: Page(request, pagename).getACL(request).may(request, self.name, attr)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 1528, in getACL
currentRevision = self.current_rev()
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 208, in current_rev
pagefile, rev, exists = self.get_rev()
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 179, in get_rev
underlay, pagedir = self.getPageStatus(check_create=0)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 307, in getPageStatus
underlay, path = self.getPageBasePath(use_underlay)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 243, in getPageBasePath
pagefile, rev, exists = self.get_rev(use_underlay=0)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 199, in get_rev
pagefile, realrev, exists = self.get_rev_dir(pagedir, realrev)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 138, in get_rev_dir
self._setRealPageName(pagedir)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/Page.py", line 163, in _setRealPageName
realPath = wikiutil.unquoteWikiname(realPath)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/wikiutil.py", line 250, in unquoteWikiname
wikiname = decodeUserInput(wikiname, charsets)
File "/Volumes/Home/nir/Projects/moin/main/MoinMoin/wikiutil.py", line 92, in decodeUserInput
return s.decode(charset)
RuntimeError: maximum recursion depth exceeded
-->
Workaround
Discussion
Plan
- Priority:
- Assigned to:
- Status: Cannot be reproduced on 1.8
