Merge pull request #17024 from owncloud/master-verify-if-path-exists-in-upload
[master] Verify if path exists
This commit is contained in:
commit
5c2646a4bf
|
@ -83,6 +83,10 @@ if (empty($_POST['dirToken'])) {
|
||||||
|
|
||||||
// The token defines the target directory (security reasons)
|
// The token defines the target directory (security reasons)
|
||||||
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
|
$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(
|
$dir = sprintf(
|
||||||
"/%s/%s",
|
"/%s/%s",
|
||||||
$path,
|
$path,
|
||||||
|
|
Loading…
Reference in New Issue