- make sure the drop box folder is used, even if the user has a login

name like '../user'
This commit is contained in:
steinm 2013-02-08 15:03:53 +00:00
parent 315fe7ac55
commit 39b4638134

View File

@ -50,6 +50,10 @@ var targetName = document.<?php echo $form?>.dropfolderfile<?php print $form ?>;
$this->contentContainerStart();
$dir = $dropfolderdir.'/'.$user->getLogin();
/* Check if we are still looking in the configured directory and
* not somewhere else, e.g. if the login was '../test'
*/
if(dirname($dir) == $dropfolderdir) {
if(is_dir($dir)) {
$d = dir($dir);
echo "<table>\n";
@ -62,6 +66,7 @@ var targetName = document.<?php echo $form?>.dropfolderfile<?php print $form ?>;
}
echo "</table>\n";
}
}
$this->contentContainerEnd();
echo "</body>\n</html>\n";