mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 17:52:02 -04:00
Properly check share permissions
isCreatable only works on folders isUpdatable if the file is not there but it is a part file also has to be checked on the folder Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
43f73ad808
commit
b66b2de6ff
1 changed files with 8 additions and 2 deletions
|
|
@ -258,11 +258,17 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
|
|||
case 'xb':
|
||||
case 'a':
|
||||
case 'ab':
|
||||
$creatable = $this->isCreatable($path);
|
||||
$creatable = $this->isCreatable(dirname($path));
|
||||
$updatable = $this->isUpdatable($path);
|
||||
// if neither permissions given, no need to continue
|
||||
if (!$creatable && !$updatable) {
|
||||
return false;
|
||||
if (pathinfo($path, PATHINFO_EXTENSION) === 'part') {
|
||||
$updatable = $this->isUpdatable(dirname($path));
|
||||
}
|
||||
|
||||
if (!$updatable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$exists = $this->file_exists($path);
|
||||
|
|
|
|||
Loading…
Reference in a new issue