From: Thomas Müller Date: Fri, 5 Jul 2013 07:58:41 +0000 (+0200) Subject: handle anonymous upload to reshared folder X-Git-Tag: v6.0.0alpha2~495^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=11172db55b5d180a9c16adb75360050985b9fe60;p=nextcloud-server.git handle anonymous upload to reshared folder --- diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 8433716dec1..fd6aa981542 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -35,6 +35,11 @@ if (empty($_POST['dirToken'])) { isset($_POST['subdir']) ? $_POST['subdir'] : '' ); + // handle reshare + if (!empty($linkItem['parent'])) { + $dir = '/Shared'.$dir; + } + if (!$dir || empty($dir) || $dir === false) { OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Unable to set upload directory.'))))); die();