Manual:$wgFileBlacklist

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgFileBlacklist and the translation is 31% complete.

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎català • ‎español • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎suomi • ‎русский • ‎తెలుగు • ‎中文 • ‎日本語
Imágenes subidas: $wgFileBlacklist
Files with these extensions will never be allowed as uploads.
Introducido en la versión:1.2.0
Eliminado en la versión:aún se usa
Valores permitidos:(array)
Valor predeterminado:(véase más abajo)
Otros configuración: Alfabéticamente | Por Función

Detalles

Files with these extensions will never be allowed as uploads.

Este es el valor predeterminado:

$wgFileBlacklist = [
  # 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 $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.php :

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


Véase también