Bug #29874 - Image extension strict whitelist handling is inconsistent
authorMark A. Hershberger <mah@users.mediawiki.org>
Mon, 18 Jul 2011 18:05:45 +0000 (18:05 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Mon, 18 Jul 2011 18:05:45 +0000 (18:05 +0000)
Patch from Dan Collins

CREDITS
includes/upload/UploadBase.php

diff --git a/CREDITS b/CREDITS
index a3b13e5..7c29b10 100644 (file)
--- 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
index fc64818..003573f 100644 (file)
@@ -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;