Last modified: 2008-09-04 08:14:02 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 T17351, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15351 - Fatal error due to passing invalid title to Linker::link (from a summary)
Fatal error due to passing invalid title to Linker::link (from a summary)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.14.x
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/w/index.php?...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-28 17:25 UTC by bdk
Modified: 2008-09-04 08:14 UTC (History)
2 users (show)

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


Attachments

Description bdk 2008-08-28 17:25:47 UTC
Please go to http://www.mediawiki.org/w/index.php?title=Project:Support_desk/Sections/Installation&offset=20080714230708&limit=4&action=history and click the two 'last' diff links in the middle of the list (the two revisions by user Asset, 2008-07-14). Both only give fatal internal errors atm. 

Linker::link passed invalid target

Backtrace:
#0 /usr/local/apache/common-local/php-1.5/includes/Linker.php(1227): Linker->link(NULL, '???', Array, Array, 'noclasses')
#1 [internal function]: Linker->formatAutocommentsCallback(Array)
#2 /usr/local/apache/common-local/php-1.5/includes/Linker.php(1194): preg_replace_callback('!(.*)/\*\s*(.*?...', Array, '/* Homepage sho...')
#3 /usr/local/apache/common-local/php-1.5/includes/Linker.php(1167): Linker->formatAutocomments('/* Homepage sho...', Object(Title), true)
#4 /usr/local/apache/common-local/php-1.5/includes/Linker.php(1316): Linker->formatComment('/* Homepage sho...', Object(Title), true)
#5 /usr/local/apache/common-local/php-1.5/includes/Linker.php(1334): Linker->commentBlock('/* Homepage sho...', Object(Title), true)
#6 /usr/local/apache/common-local/php-1.5/includes/diff/DifferenceEngine.php(266): Linker->revComment(Object(Revision), true, true)
#7 /usr/local/apache/common-local/php-1.5/includes/Article.php(738): DifferenceEngine->showDiffPage(false)
#8 /usr/local/apache/common-local/php-1.5/includes/Wiki.php(436): Article->view()
#9 /usr/local/apache/common-local/php-1.5/includes/Wiki.php(59): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#10 /usr/local/apache/common-local/php-1.5/index.php(93): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
#11 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#12 {main}

Quoting from #wikimedia-tech:
"<Raymond_afk> seems like the linker does not like a comment "Homepage shows up with just �‹�""

Note that these characters are only present in the comment for one of the two diffs. The newer one's summary is simply "Email problems".
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-08-28 23:13:20 UTC
I can't reproduce.  The issue is that the character UTF8_REPLACEMENT is not supposed to be valid in titles.  When you pass the text to Title::newFromText(), it will get rejected.  Is U+FFFD supposed to be valid in article text?  In fragments?

It should be worked around in r40194, but this is a workaround, not a proper fix, so I'm not closing the bug.
Comment 2 Tim Starling 2008-09-04 07:54:25 UTC
Fixed in r40305. Reproduced in r40041 and solution tested. $section is user input and Title::newFromText() has every right to reject it. Titles are restricted in the kind of text they can contain. Any caller passing user input to Title::newFromText() must check for failure. 
Comment 3 Tim Starling 2008-09-04 08:14:02 UTC
Not present in 1.13 because makeKnownLinkObj() failed gracefully in that version.

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


Navigation
Links