Page MenuHomePhabricator

interpolateTitle() overwrites title query param if $wgArticlePath = '/$1' if api.php is used
Closed, ResolvedPublic

Description

Author: mail

Description:
It is the same bug like here: https://bugzilla.wikimedia.org/show_bug.cgi?id=11428

The old bug was not fixed correctly because the block "if( $path == $wgScript ) return;" was added in the function interpolateTitle(). But if api.php is used path is /w/api.php and wgScript is /w/index.php so for the api interpolateTitle() continues.

Patch - Replace line 86 in WebRequest.php with:

if(strpos($path, "$wgScriptPath/") === 0 ) {
    // Script inside a rewrite path?
    // Abort to keep from breaking...
    return;
}

Version: unspecified
Severity: enhancement

Details

Reference
bz16019

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:20 PM
bzimport set Reference to bz16019.
bzimport added a subscriber: Unknown Object (MLST).