From 0c444c0c4f6140700c3fd6fcb23145be37a385b0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 22 May 2008 18:34:39 +0000 Subject: [PATCH] * (bug 14220) Disabling $wgCheckFileExtensions now works without also disabling $wgStrictFileExtensions --- RELEASE-NOTES | 3 ++- includes/SpecialUpload.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5ca8f7b669..9562a228b4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -289,7 +289,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12773) addOnloadHook() now calls functions immediately when scripts are loaded after the primary page completion, instead of dropping them * (bug 14199) Fix deletion form for image redirect pages - +* (bug 14220) Disabling $wgCheckFileExtensions now works without also + disabling $wgStrictFileExtensions === API changes in 1.13 === diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 03ff46e872..ac52d44559 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -458,12 +458,13 @@ class UploadForm { } /* Don't allow users to override the blacklist (check file extension) */ - global $wgStrictFileExtensions; + global $wgCheckFileExtensions, $wgStrictFileExtensions; global $wgFileExtensions, $wgFileBlacklist; if ($finalExt == '') { return self::FILETYPE_MISSING; } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) || - ($wgStrictFileExtensions && !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) { + ($wgCheckFileExtensions && $wgStrictFileExtensions && + !$this->checkFileExtension( $finalExt, $wgFileExtensions ) ) ) { $resultDetails = array( 'finalExt' => $finalExt ); return self::FILETYPE_BADTYPE; } -- 2.20.1