Last modified: 2012-04-12 13:56:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 26809 - Error message for file with multiple extensions, with one of them blacklisted, is confusing.
Error message for file with multiple extensions, with one of them blacklisted...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-19 20:51 UTC by Dayson
Modified: 2012-04-12 13:56 UTC (History)
3 users (show)

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


Attachments

Description Dayson 2011-01-19 20:51:11 UTC
If I upload a file with the name 'TextmeEncryption.php.zip' I get the following error message.

 ".zip" is not a permitted file type. Permitted file types are png, gif, jpg, jpeg, zip.

I have also added the following to my list LocalSettings.php

$wgFileExtensions[] = 'zip';
$wgVerifyMimeType = false; //disable mime type verification

If I rename the file to 'TextmeEncryption_php.zip', it works fine! 

But this shouldn't be the expected behavior. The first file name used is absolutely appropriate too (Both in terms of naming and mime-type).
Comment 1 Bawolff (Brian Wolff) 2011-01-19 21:10:00 UTC
As Platonides pointed out in irc, this is intentional behaviour due to Apache taking secondary extenions sometimes into account.

However, the error message should be better. For a file like the reporter's above (foo.php.zip), we detect that the .php is blacklisted, so output the bad filetype message, but when outputting that message, we use the final extension in it (.zip), which is confusing to the user.
Comment 2 Bryan Tong Minh 2011-01-22 20:34:54 UTC
Fixed in r80766.

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


Navigation
Links