* (bug 26781) {{PAGENAME}} and related parser functions escape their output better.
* (bug 26716) Provide link to instructions for external editor related preferences
and add a comment to the ini control file explaining what is going on.
+* Trying to upload a file with no extension or with a disallowed MIME type now gives
+ the right message instead of complaining about a MIME/extension mismatch
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result
global $wgVerifyMimeType;
if ( $wgVerifyMimeType ) {
wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n");
- if ( !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
- return array( 'filetype-mime-mismatch' );
- }
-
global $wgMimeTypeBlacklist;
if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) {
return array( 'filetype-badmime', $mime );
}
+ # XXX: Missing extension will be caught by validateName() via getTitle()
+ if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
+ return array( 'filetype-mime-mismatch' );
+ }
+
# Check IE type
$fp = fopen( $this->mTempPath, 'rb' );
$chunk = fread( $fp, 256 );