Page MenuHomePhabricator

Special:Upload JS does not consider wgCheckFileExtensions
Closed, ResolvedPublic


Author: spt5007

The upload interface will only accept files compliant with wgFileExtensions *even* if wgCheckFileExtensions is set to false. The problem is in the file:


My suggested fix is to make wgCheckFileExtensions a "<script> global" in includes/Skin.php or similar and then check it's value before doing the actual file extension checking in upload.js

My System:

Ubuntu 10.04 x64
Mediawiki 1.16wmf4 (r66440)
PHP 5.3.2-1ubuntu4.1 (apache2handler)
MySQL 5.1.41-3ubuntu12

Version: unspecified
Severity: minor
Platform: Other

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:06 PM
bzimport set Reference to bz23583.
bzimport added a subscriber: Unknown Object (MLST).

spt5007 wrote:

Proposed Patch


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

Hmm, perhaps it should just not export $wgFileExtensions if $wgCheckFileExtensions is off?

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

Per Brion's suggestion in comment 3 I'm adding the "reviewed" keyword. Thank you for the patch, Sean! If you have time, please do consider revising your patch for us; if you'd like tips on approach, please talk with us in MediaWiki-General on freenode IRC, or on . Thanks again.

Change 184411 had a related patch set uploaded (by Umherirrender):
Check $wgCheckFileExtensions on client side on Special:Upload


Change 184411 merged by jenkins-bot:
Check $wgCheckFileExtensions on client side on Special:Upload

Should be resolved now.