Last modified: 2014-11-13 13:03:56 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 T65424, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63424 - Resolve "wrong and broken code" that's invoking Title::newFromURL
Resolve "wrong and broken code" that's invoking Title::newFromURL
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.23.0
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-02 15:36 UTC by Daniel Norton
Modified: 2014-11-13 13:03 UTC (History)
0 users

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


Attachments

Description Daniel Norton 2014-04-02 15:36:00 UTC
The comments to Title::newFromURL read, in part:

   * Example of wrong and broken code:
   * $title = Title::newFromURL( $wgRequest->getVal( 'title' ) );
   *
   * Example of right code:
   * $title = Title::newFromText( $wgRequest->getVal( 'title' ) );

If that's accurate, then there's some code that needs fixing. Otherwise, this comment is misleading and needs correcting and/or further/clearer qualification as to when newFromURL may/should/must be used in favor of newFromText() and the related risks, if any.

The core source files that have "wrong and broken code" are:

./includes/OutputPage.php
./includes/parser/CoreParserFunctions.php
./includes/specials/SpecialListfiles.php
./includes/specials/SpecialMergeHistory.php
./includes/specials/SpecialNewimages.php
./includes/specials/SpecialRecentchangeslinked.php
./includes/specials/SpecialUndelete.php
./includes/specials/SpecialWhatlinkshere.php
./includes/Wiki.php
Comment 1 Andre Klapper 2014-11-13 13:03:56 UTC
(In reply to Daniel Norton from comment #0)
> If that's accurate, then there's some code that needs fixing.

Would love to have some confirmation in this ticket from some core developers.

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


Navigation
Links