]> source.dussan.org Git - nextcloud-server.git/commitdiff
set incognitoMode to true, getUser should always return false during public upload
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 18 Aug 2014 14:39:25 +0000 (16:39 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 18 Aug 2014 14:39:25 +0000 (16:39 +0200)
apps/files/ajax/upload.php

index f9fcfaf13c5ca1e4896688eea53020e7c3b10649..b737d5f8710aa7fe975a3b29f65b321d225126df 100644 (file)
@@ -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);