Page MenuHomePhabricator

Transclusion of file or category pages may produce unexpected results if post-expand include size limit is exceeded
Closed, ResolvedPublic

Description

When the post-expand include size limit is exceeded while transcluding a page, Parser::braceSubstitution() will replace the transclusion with a link to the page in question. However, no colon is prepended to the page name, leading to unexpected behavior if the page being transcluded is a file or a category page (or an interlanguage link, but I don't think there's any sensible reason to try transcluding those).

While such pages are rarely transcluded, it does occasionally happen; in particular, this behavior recently triggered a rather nasty bug in the ImageAnnotator script on Commons: see http://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=39469993#Many_megabytes_of_unwanted_downloads

Incidentally, the code also doesn't prepend the template namespace to titles with no namespace given, which means that such links will incorrectly point to the main namespace instead.

I have a fix for this bug that I plan to commit shortly, but I felt I should file this bug first so that I can refer to it in the comments instead of having to explain the issue in detail there.


Version: 1.17.x
Severity: minor

Details

Reference
bz23588

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:06 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz23588.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 26869 has been marked as a duplicate of this bug. ***