summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-06-19 13:20:38 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-06-19 13:20:38 +0200
commit5c2646a4bfe235487ba4177bd5733a278ab2101e (patch)
tree08d98232b6bdee8b01c01fae5a54f3546569090d /apps
parent1b7ec7d5ecbee85aa8b111219bb6c84a13c12f15 (diff)
parentebb55236982ea5a30b08dbbeb98c32c059db3807 (diff)
downloadnextcloud-server-5c2646a4bfe235487ba4177bd5733a278ab2101e.tar.gz
nextcloud-server-5c2646a4bfe235487ba4177bd5733a278ab2101e.zip
Merge pull request #17024 from owncloud/master-verify-if-path-exists-in-upload
[master] Verify if path exists
Diffstat (limited to 'apps')
-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 4d5dc84e9c7..debdf26ffdf 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -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,