archive: prevent crossing user boundary

pull/460/head
Varun Patil 2023-03-03 12:29:17 -08:00
parent 1cad7828e6
commit 2bfb04702e
1 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,11 @@ class ArchiveController extends ApiBase
break; break;
} }
// Hit the user's root folder
if ($parent->getPath() === $userFolder->getPath()) {
break;
}
// Hit a storage root // Hit a storage root
try { try {
if ($parent->getParent()->getStorage()->getId() !== $fileStorageId) { if ($parent->getParent()->getStorage()->getId() !== $fileStorageId) {