Merge pull request #17024 from owncloud/master-verify-if-path-exists-in-upload

[master] Verify if path exists
This commit is contained in:
Thomas Müller 2015-06-19 13:20:38 +02:00
commit 5c2646a4bf
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ if (empty($_POST['dirToken'])) {
// The token defines the target directory (security reasons)
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
if($path === null) {
OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Unable to set upload directory.')))));
die();
}
$dir = sprintf(
"/%s/%s",
$path,