January 22nd, 2020
**Let me preface this post by saying, in general, it is not advisable to allow exe files to be uploaded for security reasons.
I have a privately hosted wiki for storing various files and code snippets for my personal use, and recently I attempted to upload an exe file and was met with the error message:
".exe" is not a permitted file type.
I already have mime checking disabled via
$wgVerifyMimeType = false;
and had ‘exe added in $wgFileExtensions.
Though again, this is not advisable unless you are the only one who will be accessing this MediaWiki instance.
As it turns out, some file types are blacklisted so that even if its added to the list of allowed extensions it will still not be uploaded.
To get around this, add the line
$wgFileBlacklist = array_diff($wgFileBlacklist, array('exe'));
to your LocalSettings.php
This works for other banned extensions such as .dll. To do dll files, add this line instead:
$wgFileBlacklist = array_diff($wgFileBlacklist, array('dll'));
For both exe and dll, use this:
$wgFileBlacklist = array_diff($wgFileBlacklist, array('exe', 'dll'));