Manual:$wgStrictFileExtensions

Details
$wgStrictFileExtensions = false; If set to true, users will only be able to upload files with proper extensions (see $wgFileExtensions).

If set to false, users will be able to upload files with almost any extension. A user attempting to upload a file whose extension is not in $wgFileExtensions will receive a warning message. However he may choose to ignore the message and upload the file anyway (assuming the file's extension is not in the $wgFileBlacklist).