From: Benjamin Lees Date: Thu, 6 Jan 2011 00:12:49 +0000 (+0000) Subject: Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in Setup... X-Git-Tag: 1.31.0-rc.0~32781 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=180c128d1e3afd22c06f364e9b464ad5176a7aaa;p=lhc%2Fweb%2Fwiklou.git Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in Setup.php, rather than in specials/SpecialUpload.php. --- diff --git a/includes/Setup.php b/includes/Setup.php index d28b339ef7..fccddbde24 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -298,6 +298,9 @@ if ( $wgInvalidateCacheOnLocalSettingsChange ) { $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) ); } +# Blacklisted file extensions shouldn't appear on the "allowed" list +$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist ); + wfProfileOut( $fname.'-misc1' ); wfProfileIn( $fname.'-memcached' ); diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 0e81f91a5a..2db1e27666 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -899,9 +899,6 @@ class UploadForm extends HTMLForm { $wgFileExtensions, $wgFileBlacklist; if( $wgCheckFileExtensions ) { - //don't show blacklisted types as permitted - $wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist ); - if( $wgStrictFileExtensions ) { # Everything not permitted is banned $extensionsList =