Jump to content

Enabling .exe extension for FieldtypeFile


Recommended Posts

"exe" is among the file extensions that is blocked in WireUpload.php

 * Disallowed extensions for uploaded filenames
 * @var array
protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh');

But it turns out you can override this by setting your own custom array of blocked extensions in your /site/config.php

// Remove "exe" from array of file extensions blocked by WireUpload
$config->uploadBadExtensions = array('php', 'php3', 'phtml', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh');

Of course exe is probably blocked by default for a reason so you would want to do your own research about possible risks involved in allowing such files on your server.

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...