From 23a4d0d44ef8b918f054e7ad608d04b2e9a68995 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Tue, 21 Jan 2014 11:32:30 +0100 Subject: OC_Util::setupFS($user) will create a data dir for the given string - no matter if the user really exists - OCP\JSON::checkUserExists($owner); introduces a ready to use check which will bail out with an JSON error --- apps/files/ajax/upload.php | 1 + apps/files/triggerupdate.php | 1 + 2 files changed, 2 insertions(+) (limited to 'apps/files') diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 0e905f993ac..bdaf6a77d14 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -34,6 +34,7 @@ if (empty($_POST['dirToken'])) { // resolve reshares $rootLinkItem = OCP\Share::resolveReShare($linkItem); + OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); // Setup FS with owner OC_Util::tearDownFS(); OC_Util::setupFS($rootLinkItem['uid_owner']); diff --git a/apps/files/triggerupdate.php b/apps/files/triggerupdate.php index 0e29edbba35..a37b9823add 100644 --- a/apps/files/triggerupdate.php +++ b/apps/files/triggerupdate.php @@ -6,6 +6,7 @@ if (OC::$CLI) { if (count($argv) === 2) { $file = $argv[1]; list(, $user) = explode('/', $file); + OCP\JSON::checkUserExists($owner); OC_Util::setupFS($user); $view = new \OC\Files\View(''); /** -- cgit v1.2.3