diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-08-18 16:39:25 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-08-18 16:39:25 +0200 |
commit | 043cd1d02bb5340b8231a1d59add9ffce9bd3120 (patch) | |
tree | 342572b4ee477c609d45c5aa7e8d563b3a57642f | |
parent | ce64d07ec79b6d0c7a989e33f9285c705c2f7db1 (diff) | |
download | nextcloud-server-043cd1d02bb5340b8231a1d59add9ffce9bd3120.tar.gz nextcloud-server-043cd1d02bb5340b8231a1d59add9ffce9bd3120.zip |
set incognitoMode to true, getUser should always return false during public upload
-rw-r--r-- | apps/files/ajax/upload.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index f9fcfaf13c5..b737d5f8710 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -24,6 +24,8 @@ if (empty($_POST['dirToken'])) { // and the upload/file transfer code needs to be refactored into a utility method // that could be used there + \OC_User::setIncognitoMode(true); + // return only read permissions for public upload $allowedPermissions = OCP\PERMISSION_READ; $publicDirectory = !empty($_POST['subdir']) ? $_POST['subdir'] : '/'; @@ -175,7 +177,7 @@ if (strpos($dir, '..') === false) { } catch(Exception $ex) { $error = $ex->getMessage(); } - + } else { // file already exists $meta = \OC\Files\Filesystem::getFileInfo($target); |