fix(dav): do not list intermediate upload folders

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-04-08 23:09:51 +02:00 committed by backportbot[bot]
parent 96f1135a77
commit faff7edb49
2 changed files with 3 additions and 3 deletions

View file

@ -39,6 +39,7 @@ class RootCollection extends AbstractPrincipalCollection {
CleanupService $cleanupService) {
parent::__construct($principalBackend, $principalPrefix);
$this->cleanupService = $cleanupService;
$this->disableListing = true;
}
/**

View file

@ -29,6 +29,7 @@ use OC\Files\Filesystem;
use OC\Files\View;
use OCA\DAV\Connector\Sabre\Directory;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\ICollection;
class UploadHome implements ICollection {
@ -58,9 +59,7 @@ class UploadHome implements ICollection {
}
public function getChildren(): array {
return array_map(function ($node) {
return new UploadFolder($node, $this->cleanupService, $this->getStorage());
}, $this->impl()->getChildren());
throw new MethodNotAllowed('Listing members of this collection is disabled');
}
public function childExists($name): bool {