Last modified: 2012-12-14 23:12:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10158, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8158 - Self-transclusion not properly forbidden
Self-transclusion not properly forbidden
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
PC Linux
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: 8159 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-12-05 15:14 UTC by Steve Sanbeg
Modified: 2012-12-14 23:12 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Steve Sanbeg 2006-12-05 15:14:40 UTC
Any self transclusion is rendered like a self link in the regression tests, even
if they would work on the wiki. i.e.

this is me
On the wiki redners as:
<p>this is me
</p><p>this is me
but in the tests, as:
<p>this is me
</p><p><strong class="selflink">Nois</strong>
Comment 1 Steve Sanbeg 2006-12-05 15:31:15 UTC
*** Bug 8159 has been marked as a duplicate of this bug. ***
Comment 2 Brion Vibber 2006-12-05 20:33:15 UTC
Note that self-transclusion is forbidden, so the test result shows the correct

Looks like you've got a bug there.
Comment 3 Steve Sanbeg 2006-12-05 21:02:00 UTC
(In reply to comment #2)
> Note that self-transclusion is forbidden, so the test result shows the correct
> behavior.
> Looks like you've got a bug there.

But doesn't that happen in Parser->mwTemplatePath *after* the first
transclusion?  I'm not surprised that a page can transclude itself; I would be
if a page could transclude a self-transcluding template.

It seems as if the regression test does the loop check earlier than the wiki,
but I don't know how this happens.
Comment 4 Brion Vibber 2006-12-05 21:39:27 UTC
It *ought* to happen *before* the first transclusion, to ensure that
self-transclusion is prevented. If that's not how the code is now,
it should be fixed.

I'm not sure why the behavior on the regression test would be different
Comment 5 Brion Vibber 2007-01-16 23:32:54 UTC
Live behavior is correct at this time (shows as self-link).
Comment 6 Brion Vibber 2007-01-16 23:40:46 UTC
No, still broken.

*goes mad*

The parser test "works" properly because the page isn't saved in the database;
it's equivalent to doing a preview on a not-yet-existing page.

Note You need to log in before you can comment on or make changes to this bug.