From 180c128d1e3afd22c06f364e9b464ad5176a7aaa Mon Sep 17 00:00:00 2001 From: Benjamin Lees Date: Thu, 6 Jan 2011 00:12:49 +0000 Subject: [PATCH] Follow-up to r78285: remove blacklisted file types from $wgFileExtensions in Setup.php, rather than in specials/SpecialUpload.php. --- includes/Setup.php | 3 +++ includes/specials/SpecialUpload.php | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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 = -- 2.20.1