From: Brian Wolff Date: Mon, 17 Jun 2013 22:48:01 +0000 (-0300) Subject: Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false; X-Git-Tag: 1.31.0-rc.0~19085^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=337fd7790e8d5e3a9983225c56adcd8ea8d496e7;p=lhc%2Fweb%2Fwiklou.git Follow-up 42333412833a - Fix behaviour $wgVerifyMimeType = false; Should probably be backported to stable. Bug: 49717 Change-Id: If1d6e8fed575bf2816a10db066ec4e023460ee1e --- diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 2ed20c5603..710a501372 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -410,10 +410,10 @@ abstract class UploadBase { return $status; } - if ( $wgVerifyMimeType ) { - $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension ); - $mime = $this->mFileProps['file-mime']; + $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension ); + $mime = $this->mFileProps['file-mime']; + if ( $wgVerifyMimeType ) { # XXX: Missing extension will be caught by validateName() via getTitle() if ( $this->mFinalExtension != '' && !$this->verifyExtension( $mime, $this->mFinalExtension ) ) { wfProfileOut( __METHOD__ );