Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎తెలుగు • ‎中文
Uploads: $wgFileBlacklist
Files with these extensions will never be allowed as uploads.
Introduced in version: 1.2.0
Removed in version: still in use
Allowed values: array
Default value: (see below)
Other settings: Alphabetical | By function


Files with these extensions will never be allowed as uploads if $wgCheckFileExtensionsManual:$wgCheckFileExtensions is set to true.

This is the default value:

$wgFileBlacklist = array(
  # HTML may contain cookie-stealing JavaScript and web bugs
  'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
  # PHP scripts may execute arbitrary code on the server
  'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
  # Other types that may be interpreted by some servers
  'shtml', 'jhtml', 'pl', 'py', 'cgi',
  # May contain harmful executables for Windows victims
  'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );

$wgFileBlacklist overrides $wgFileExtensionsManual:$wgFileExtensions, so you must remove an extension from the blacklist before you can upload files that have it. For instance, to allow users to upload executables, add this to LocalSettings.phpManual:LocalSettings.php:

$wgFileExtensions[] = 'exe';
$wgFileBlacklist = array_diff( $wgFileBlacklist, array ('exe') );

See also[edit]