[Pkg-owncloud-commits] [owncloud] 88/121: set incognitoMode to true, getUser should always return false during public upload
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 16:44:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 2b449dd4fd66ca0b7d07fcd3b835b7af55f1d384
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Mon Aug 18 16:39:25 2014 +0200
set incognitoMode to true, getUser should always return false during public upload
---
apps/files/ajax/upload.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index f9fcfaf..b737d5f 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list