To replace spaces with underscores and then remove everything that isn’t alpha-numeric open up

wolf/plugins/file_manager.FileManagerController.php

and replace the existing upload function (approx line 259) with this.

public function upload() {
$data = $_POST['upload'];
$path = str_replace('..', '', $data['path']);
$overwrite = isset($data['overwrite']) ? true: false;

if (isset($_FILES)) {

// $file = upload_file($_FILES['upload_file']['name'], FILES_DIR.'/'.$path.'/', $_FILES['upload_file']['tmp_name'], $overwrite);
$clean_file_name = preg_replace('/ /', '_', $_FILES['upload_file']['name'] );
$clean_file_name = preg_replace('/[^A-Za-z0-9_.]/', '', $clean_file_name );

$file = upload_file( $clean_file_name, FILES_DIR.'/'.$path.'/', $_FILES['upload_file']['tmp_name'], $overwrite);

if ($file === false)
Flash::set('error', __('File has not been uploaded!'));
}
redirect(get_url('plugin/file_manager/browse/'.$path));
}

Yes I admit I have mangled MySql on my macbook very badly and it had to go…. here is what it took to do it

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*

© 2012 James Border Suffusion theme by Sayontan Sinha