Skip to content

Commit

Permalink
Merge pull request #2792 from x7airworker/master
Browse files Browse the repository at this point in the history
Fixed an ACL bug which disallowed renaming of files in certain configurations
  • Loading branch information
come-nc authored Mar 11, 2024
2 parents eff78cb + 6f8b431 commit 7544744
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ACL/ACLStorageWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ public function rename($source, $target) {
if ($sourceParent === '.') {
$sourceParent = '';
}
return $this->checkPermissions($sourceParent, Constants::PERMISSION_DELETE) &&
$targetParent = dirname($target);
if ($targetParent === '.') {
$targetParent = '';
}
return ($sourceParent === $targetParent ||
$this->checkPermissions($sourceParent, Constants::PERMISSION_DELETE)) &&
$this->checkPermissions($source, Constants::PERMISSION_UPDATE & Constants::PERMISSION_READ) &&
$this->checkPermissions($target, $permissions) &&
parent::rename($source, $target);
Expand Down

0 comments on commit 7544744

Please sign in to comment.