Page MenuHomePhabricator

Image import maintenance script uses buggy PHP5 basename() breaking multibyte chinese hebrew greek internationalisation
Closed, ResolvedPublic


Author: carlb613

In most of the MediaWiki PHP code, PHP's basename() function has been replaced
with wfBaseName() from includes/GlobalFunctions because the PHP default version
is seriously buggy in handling multibyte characters.

Even after SVN update to get updated to revision 16459, the
maintenance/importImages.php script still seems to call the default PHP
basename() function. This breaks import of all images in which the basename
begins with a UTF-8 two-byte character. In languages such as el: he: zh: which
aren't based on the western-euro character set, normally nothing will be
correctly importable as stripping leading two-byte characters leaves basically
nothing but the .jpg or .png extension. Other languages with a few non-ASCII
characters will be affected, but to a lesser extent.

Version: 1.8.x
Severity: normal
OS: Linux
URL: maintenance/importImages.php



Event Timeline

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