Page MenuHomePhabricator

Title.php should consider ":" to be an invalid title
Closed, ResolvedPublic

Description

Title::newFromText(':') results in an apparently valid Title object that stringifies to "".

It seems to be caused by the following logic in Title#secureAndSplit:

if ( $dbkey == '' && $this->mInterwiki == '' && $this->mNamespace != NS_MAIN ) {

	return false;

}

The last check for namespace != NS_MAIN explicitly makes it so that 'Talk:' is considered invalid, but ':' is excluded for some reason.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51750

Details

Reference
bz54044

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz54044.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle created this task.Sep 11 2013, 10:45 PM

Related to bug 51750?

  • Bug 53556 has been marked as a duplicate of this bug. ***

Change 99674 had a related patch set uploaded by Umherirrender:
Make a single colon a invalid title in php and js

https://gerrit.wikimedia.org/r/99674

Change 99674 merged by jenkins-bot:
Make a single colon an invalid title in php and js

https://gerrit.wikimedia.org/r/99674

Change 104019 had a related patch set uploaded by Umherirrender:
Remove hints to fixed bug 54044

https://gerrit.wikimedia.org/r/104019

Change 104019 merged by jenkins-bot:
Remove hints to fixed bug 54044

https://gerrit.wikimedia.org/r/104019