No edit summary Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
{{Textbox|boxtype=important|header=XML file type: | {{Textbox|boxtype=important|header=XML file type:|text=The ''xml'' file type is blacklisted since MW 1.39 and has to be allowed in ''LocalSettings.php'': | ||
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
$GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] ); | $GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] ); | ||
$GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] ); | $GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] ); | ||
</syntaxhighlight>|icon=no}} | </syntaxhighlight>|icon=no}} |
Latest revision as of 08:09, 1 August 2024
XML file type:The xml file type is blacklisted since MW 1.39 and has to be allowed in LocalSettings.php:
$GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] );
$GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] );