Page MenuHomePhabricator

Skin.php: $this->getSkinName() calls lowercase skinname.css if $wgCapitalLinks is off
Closed, ResolvedPublic

Description

Author: herd

Description:
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Common.css&amp;usemsgcache=yes...
<link rel="stylesheet" href="/w/index.php?title=MediaWiki:monobook.css&amp;usemsgcache=yes...

With capitalized links off, getSkinName() passed through Title::makeTitleSafe returns lowercased, eg "monobook.css". Message names always have to be uppercase page names (with some exceptions).

However, this still works for this particular instance, as usemsgcache=yes normalizes the case back to "Monobook.css", and returns the contents... but this is a fragile situation. Several things could break it, and testing skinname.css with $wgCapitalLinks is probably not done on every edit to Skin.php ...?

Probably getSkinName() should be ucfirst'd there?


Version: 1.15.x
Severity: trivial
URL: http://en.wiktionary.org/wiki/Special:BlankPage?useskin=monobook

Details

Reference
bz17700

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:34 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz17700.
bzimport added a subscriber: Unknown Object (MLST).

ucfirst() on getSkinName() would be a short-term fix. Ideally, secureAndSplit() should normalize message titles.

herd wrote:

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

This should be fixed in r57558.