Page MenuHomePhabricator

mediawiki.Title: Extension should be included when asserting that title is non-empty
Closed, ResolvedPublic

Description

Titles like ".dm" ( http://sah.wikipedia.org/wiki/.dm ) will throw an error when using the mw.Title constructor with them. Apparently mw.Title tries to be smart and treads this as a title with file extension. At least it enters mw.Title.setNameAndExtension() where the validation fails. '.123456' though will be accepted since the part behind the dot is longer than 5 characters.


Version: 1.19
Severity: normal

Details

Reference
bz38081

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:49 AM
bzimport set Reference to bz38081.

Yeah, it shouldn't validate extensions because extensions are only an end-user convenience, no significant to them.

rephrasing summary to problem-solution orientation.

It fails because after stripping off the extension, the title is empty, which is invalid.

Change 83047 had a related patch set uploaded by Krinkle:
mw.Title: Rewrite from scratch (porting logic from Title.php)

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

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

Change 83047 merged by jenkins-bot:
mw.Title: Rewrite from scratch (porting logic from Title.php)

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

Fixed and merged. Thank you hugely to Timo, and to Roan for merging. Yay.

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