Last modified: 2010-12-07 03:25:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20372, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18372 - File upload error messages don't properly take $wgFileBlacklist into account
File upload error messages don't properly take $wgFileBlacklist into account
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.15.x
All All
: Normal minor (vote)
: ---
Assigned To: Michael Dale
http://www.mwusers.com/forums/showthr...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-06 20:54 UTC by Emufarmers
Modified: 2010-12-07 03:25 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Emufarmers 2009-04-06 20:54:56 UTC
If you've set $wgFileExtensions[] = 'exe'; and try to upload an executable, you will get an error message:
".exe" is not a permitted file type. Permitted file types are png, gif, jpg, jpeg, doc, xls, ppt, pps, pdf, png, gif, jpg, jpeg, xml, xsd, wsdl, txt, exe, zip."
because .exe is blacklisted.

An extension being in $wgFileExtensions should probably override its being blacklisted: I assume $wgFileBlacklist is just there to make $wgStrictFileExtensions = false; safe.
Comment 1 Michael Dale 2009-07-25 17:39:50 UTC
I think there are a bit too many configuration variables here. I recommend we depreciate blacklisted extensions and only those listed in wgFileExtensions? Do we lose any functionality that way? Seems strange to have to change it in two places (ie add it to wgFileExtensions and remove it from wgFileBlacklist ) or set $wgStrictFileExtensions = false;
Comment 2 Emufarmers 2010-12-07 03:25:37 UTC
Fixed in r77956.

Having $wgFileBlacklist lets you set $wgStrictFileExtensions = false; to make it so that certain extensions are warned against but not blocked.  I'm not sure how useful that behavior actually is, but I left it alone.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links