switch($filemode) {
case 'path':
$file->file_path = $formData['filepath'];
if(strpos($file->file_path, '..') !== false)
return false;
$firstChar = substr($file->file_path,0,1);
if(substr($file->file_path, 0, 7) != 'http://' && substr($file->file_path, 0, 8) != 'https://' && !in_array($firstChar, array('#','@'))) {
$config =& hikashop_config();
$clean_filename = JPath::clean($file->file_path);
$secure_path = $config->get('uploadsecurefolder');
if((JPATH_ROOT != '') && strpos($clean_filename, JPath::clean(JPATH_ROOT)) !== 0 && strpos($clean_filename, JPath::clean($secure_path)) !== 0)
return false;
}
break;