Last modified: 2012-04-12 13:56:08 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 T28809, the corresponding Phabricator task for complete and up-to-date bug report information.
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