Author: anon.hui
Description:
According to, includes/MimeMagic.php
// Check for ZIP (before getimagesize) if ( strpos( $tail, "PK\x05\x06" ) !== false ) { wfDebug( __METHOD__.": ZIP header present at end of $file\n" ); return $this->detectZipType( $head ); }
Some xls (ms excel) files contain "PK\x05\x06", so it incorrectly detect as zip file and not pass filetype checking.
Here is the debugging message shown by $wgDebugComments=true,
mime: <application/zip> extension: <xls> UploadForm::verifyExtension: mime type application/zip mismatches file extension xls, rejecting file
Version: 1.14.x
Severity: normal