From c432e9e7e3708913480b2feffbf4612cb198df9d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Apr 2024 16:29:07 +0200 Subject: [PATCH 1/2] fix(files): Also skip cross storage move with access control Signed-off-by: Joas Schilling --- lib/private/Files/Storage/Local.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 5d997873f9ab4..e623f652dedf3 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -545,6 +545,8 @@ private function canDoCrossStorageMove(IStorage $sourceStorage) { // 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); } From dbff2d5d6be7b33b11cd2d3f7a7ddb9f931cd7c8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Apr 2024 09:24:11 +0200 Subject: [PATCH 2/2] fix(CI): Suppress psalm UndefinedClass Signed-off-by: Joas Schilling --- lib/private/Files/Storage/Local.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index e623f652dedf3..8eaea7d954dae 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -540,6 +540,7 @@ 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