Skip to content

Commit 66bfac6

Browse files
committed
fix(objectstore): check if source path is readable before copying
Signed-off-by: Kent Delante <kent@delante.me>
1 parent d86df72 commit 66bfac6

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
@@ -601,6 +601,10 @@ public function copyFromStorage(
601601
string $targetInternalPath,
602602
bool $preserveMtime = false,
603603
): bool {
604+
if (!$sourceStorage->isReadable($sourceInternalPath)) {
605+
return false;
606+
}
607+
604608
// the shortcuts below copy the object verbatim, an encrypted source has to be
605609
// read through its encryption wrapper instead
606610
if ($sourceStorage->instanceOfStorage(Encryption::class)

0 commit comments

Comments
 (0)