diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-19 13:20:38 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-19 13:20:38 +0200 |
commit | 5c2646a4bfe235487ba4177bd5733a278ab2101e (patch) | |
tree | 08d98232b6bdee8b01c01fae5a54f3546569090d /apps | |
parent | 1b7ec7d5ecbee85aa8b111219bb6c84a13c12f15 (diff) | |
parent | ebb55236982ea5a30b08dbbeb98c32c059db3807 (diff) | |
download | nextcloud-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.php | 4 |
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, |