Added adm folder to allowed upload folders

This commit is contained in:
Marc Alexander
2011-04-24 21:49:07 +02:00
parent e223d2ce63
commit 7b8d5f0cb6

View File

@@ -112,7 +112,8 @@ class portal_upload
$cur_path = str_replace($mod_dir . '/', '', $cur_path);
$cut_pos = strpos($cur_path, '/');
if(!in_array(substr($cur_path, 0, $cut_pos), array('portal', 'language', 'styles')))
// Only allow files in adm, language, portal and styles folder
if(!in_array(substr($cur_path, 0, $cut_pos), array('adm', 'language', 'portal', 'styles')))
{
$file->remove();
$this->directory_delete($mod_dir);