mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
set incognitoMode to true, getUser should always return false during public upload
This commit is contained in:
parent
ce64d07ec7
commit
043cd1d02b
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue