Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382749 )
Change subject: Disallow most file types from upload to enwikivoyage ...................................................................... Disallow most file types from upload to enwikivoyage This disallows all audio, video and media file types (and some image types) that we normally allow on all wikis. The only allowed file types that remain are: jpg/jpeg, gif, png, tif/tiff, svg. Added 'wmgFileBlacklist' to allow easy configuration of this per-wiki. Bug: T176647 Change-Id: I6c625954b4a24e37289447335b81221177cba3bd --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/49/382749/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 62cfa4e..c932ae9 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -491,9 +491,6 @@ $wgImageMagickConvertCommand = '/usr/local/bin/mediawiki-firejail-convert'; $wgSharpenParameter = '0x0.8'; # for IM>6.5, T26857 -$wgFileBlacklist[] = 'txt'; -$wgFileBlacklist[] = 'mht'; - if ( $wmgUsePagedTiffHandler ) { wfLoadExtension( 'PagedTiffHandler' ); } @@ -504,6 +501,7 @@ $wgMaxAnimatedGifArea = 10e7; // 100MP $wgFileExtensions = array_merge( $wgFileExtensions, $wmgFileExtensions ); +$wgFileBlacklist = array_merge( $wgFileBlacklist, $wmgFileBlacklist ); if ( isset( $wmgUploadStashMaxAge ) ) { $wgUploadStashMaxAge = $wmgUploadStashMaxAge; diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index a116c45..d6acc39 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -19126,6 +19126,7 @@ ], 'wmgFileExtensions' => [ + // Note that 'wmgPrivateWikiUploads' allows additional file extensions on some wikis 'default' => [ 'xcf', 'pdf', @@ -19144,6 +19145,18 @@ ], ], +'wmgFileBlacklist' => [ + 'default' => [ + 'txt', + 'mht', + ], + '+enwikivoyage' => [ + // Some of these are allowed by MediaWiki core or extensions and it is not sufficient + // to remove them from 'wmgFileExtensions' + 'webp', 'xcf', 'pdf', 'mid', 'ogg', 'ogv', 'djvu', 'oga', 'flac', 'opus', 'wav', 'webm', + ], +], + 'wgRedirectSources' => [ 'default' => false, 'donatewiki' => '!^https?://donate\.wikimedia\.org/!', -- To view, visit https://gerrit.wikimedia.org/r/382749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c625954b4a24e37289447335b81221177cba3bd Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits