Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-06-19 16:47:00 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-06-19 16:47:00 +0300
commit8f8470cf101b6f67ae4131714c6db067e3a20b4b (patch)
tree103f46838a2aa8989789d7eb4ea36baf0bed2cf2
parent24b21d2ed13ecab5c5fb7269440c067647b5fa62 (diff)
parent0a35d65b5deed63c31564ec0d853578fa4ff8b6e (diff)
Merge pull request #17023 from owncloud/stable6-verify-path
[stable6] Verify if path exists
-rw-r--r--apps/files/ajax/upload.php4
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,