Skip to content

Commit

Permalink
Merge pull request #44891 from nextcloud/backport/44889/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(files): Also skip cross storage move with access control
  • Loading branch information
nickvergessen authored Apr 18, 2024
2 parents 9b31ff5 + 0095ce7 commit 2a9a5b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,14 @@ private function calculateEtag(string $path, array $stat): string {
}

private function canDoCrossStorageMove(IStorage $sourceStorage) {
/** @psalm-suppress UndefinedClass */
return $sourceStorage->instanceOfStorage(Local::class)
// Don't treat ACLStorageWrapper like local storage where copy can be done directly.
// Instead, use the slower recursive copying in php from Common::copyFromStorage with
// more permissions checks.
&& !$sourceStorage->instanceOfStorage('OCA\GroupFolders\ACL\ACLStorageWrapper')
// Same for access control
&& !$sourceStorage->instanceOfStorage(\OCA\FilesAccessControl\StorageWrapper::class)
// when moving encrypted files we have to handle keys and the target might not be encrypted
&& !$sourceStorage->instanceOfStorage(Encryption::class);
}
Expand Down

0 comments on commit 2a9a5b3

Please sign in to comment.