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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8158 - Self-transclusion not properly forbidden
Self-transclusion not properly forbidden
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.9.x
PC Linux
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 8159 (view as bug list)
Depends on:
Blocks:
  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: ---


Attachments

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
<noinclude>
{{:Nois}}
</noinclude>
---
On the wiki redners as:
---
<p>this is me
</p><p>this is me
</p>
---
but in the tests, as:
---
<p>this is me
</p><p><strong class="selflink">Nois</strong>
</p>
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
behavior.

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
offhand.
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.


Navigation
Links