summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-08-18 16:39:25 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-08-19 10:13:24 +0200
commit2b449dd4fd66ca0b7d07fcd3b835b7af55f1d384 (patch)
treedc0bbcda312bc996f44d40f1751f5b410e1616b1 /apps
parentbe7cb7298af0c01442653298c0b4d77db0d331bf (diff)
downloadnextcloud-server-2b449dd4fd66ca0b7d07fcd3b835b7af55f1d384.tar.gz
nextcloud-server-2b449dd4fd66ca0b7d07fcd3b835b7af55f1d384.zip
set incognitoMode to true, getUser should always return false during public upload
Diffstat (limited to 'apps')
-rw-r--r--apps/files/ajax/upload.php4
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);