diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-19 15:47:00 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-19 15:47:00 +0200 |
commit | 8f8470cf101b6f67ae4131714c6db067e3a20b4b (patch) | |
tree | 103f46838a2aa8989789d7eb4ea36baf0bed2cf2 | |
parent | 24b21d2ed13ecab5c5fb7269440c067647b5fa62 (diff) | |
parent | 0a35d65b5deed63c31564ec0d853578fa4ff8b6e (diff) | |
download | nextcloud-server-8f8470cf101b6f67ae4131714c6db067e3a20b4b.tar.gz nextcloud-server-8f8470cf101b6f67ae4131714c6db067e3a20b4b.zip |
Merge pull request #17023 from owncloud/stable6-verify-path
[stable6] Verify if path exists
-rw-r--r-- | apps/files/ajax/upload.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index a2ec88f98eb..c73af205708 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -45,6 +45,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, |