[Pkg-owncloud-commits] [owncloud] 67/70: set incognitoMode to true, getUser should always return false during public upload
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 17:40:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v6.0.5RC1
in repository owncloud.
commit 1e692e56e17e5530025623894307df4d4de9f803
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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 07e39a8..a2ec88f 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -19,6 +19,9 @@ if (empty($_POST['dirToken'])) {
die();
}
} else {
+
+ \OC_User::setIncognitoMode(true);
+
// return only read permissions for public upload
$allowedPermissions = OCP\PERMISSION_READ;
$public_directory = !empty($_POST['subdir']) ? $_POST['subdir'] : '/';
@@ -158,7 +161,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