Skip to content

Commit 752a2c6

Browse files
authored
Merge pull request #67059 from nextcloud/backport/67023/stable31
[stable31] fix(objectstore): check if source path is readable before copying
2 parents a87a61f + a5afca0 commit 752a2c6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib/private/Files/ObjectStore/ObjectStoreStorage.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ public function copyFromStorage(
576576
string $targetInternalPath,
577577
bool $preserveMtime = false,
578578
): bool {
579+
if (!$sourceStorage->isReadable($sourceInternalPath)) {
580+
return false;
581+
}
582+
579583
if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class)) {
580584
/** @var ObjectStoreStorage $sourceStorage */
581585
if ($sourceStorage->getObjectStore()->getStorageId() === $this->getObjectStore()->getStorageId()) {

0 commit comments

Comments
 (0)