From: Mark A. Hershberger Date: Mon, 18 Jul 2011 18:05:45 +0000 (+0000) Subject: Bug #29874 - Image extension strict whitelist handling is inconsistent X-Git-Tag: 1.31.0-rc.0~28772 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=b526cd0d68047c086b2dd908a54e61b4489ec1df;p=lhc%2Fweb%2Fwiklou.git Bug #29874 - Image extension strict whitelist handling is inconsistent Patch from Dan Collins --- diff --git a/CREDITS b/CREDITS index a3b13e562d..7c29b108af 100644 --- a/CREDITS +++ b/CREDITS @@ -90,6 +90,7 @@ following names for their contribution to the product. * Carsten Nielsen * Conrad Irwin * Dan Barrett +* Dan Collins * Dan Nessett * Daniel Arnold * Denny Vrandecic diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index fc64818fe5..003573f273 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -672,7 +672,7 @@ abstract class UploadBase { return $this->mTitle = null; } elseif ( $blackListedExtensions || ( $wgCheckFileExtensions && $wgStrictFileExtensions && - !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) { + !$this->checkFileExtensionList( $ext, $wgFileExtensions ) ) ) { $this->mBlackListedExtensions = $blackListedExtensions; $this->mTitleError = self::FILETYPE_BADTYPE; return $this->mTitle = null;