From: Brion Vibber Date: Thu, 22 May 2008 18:34:39 +0000 (+0000) Subject: * (bug 14220) Disabling $wgCheckFileExtensions now works without also disabling ... X-Git-Tag: 1.31.0-rc.0~47464 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=0c444c0c4f6140700c3fd6fcb23145be37a385b0;p=lhc%2Fweb%2Fwiklou.git * (bug 14220) Disabling $wgCheckFileExtensions now works without also disabling $wgStrictFileExtensions --- 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; }