Page MenuHomePhabricator

$wgCheckFileExtensions doesn't seem to work
Closed, ResolvedPublic


Author: florian.dufour


I'm using Mediawiki 1.12.0. In LocalSettings.php, I set $wgCheckFileExtensions to false and I didn't update $wgFileExtensions (using default parameters).

However, even with $wgCheckFileExtensions set to false, I'm not able to upload a PDF file (for example). Of course, if I add 'pdf' on $wgFileExtensions array, it works as expected.

What I would expect : when $wgCheckFileExtensions is set to false, no extension checking should take place.

This bug is also described in the manual page ( but doesn't seem to be filed in Bugzilla.

  • Special:Version

    MediaWiki 1.12.0 (r32735) PHP 5.2.6-pl1-gentoo (apache2handler) MySQL 5.0.54



Version: 1.12.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:09 PM
bzimport added a project: MediaWiki-Uploading.
bzimport set Reference to bz14220.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.May 22 2008, 7:17 AM
brion added a comment.May 22 2008, 6:35 PM

Fixed in r35195

The final upload check was checking $wgStrictFileExtensions only, which shouldn't apply when $wgCheckFileExtensions is disabled.

Gilles moved this task from Untriaged to Done on the Multimedia board.