Skip to content

Commit 5587f1a

Browse files
committed
fix(dav): do not list intermediate upload folders
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 1165c15 commit 5587f1a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/dav/lib/Upload/RootCollection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct(PrincipalBackend\BackendInterface $principalBackend,
3939
CleanupService $cleanupService) {
4040
parent::__construct($principalBackend, $principalPrefix);
4141
$this->cleanupService = $cleanupService;
42+
$this->disableListing = true;
4243
}
4344

4445
/**

apps/dav/lib/Upload/UploadHome.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use OC\Files\View;
3030
use OCA\DAV\Connector\Sabre\Directory;
3131
use Sabre\DAV\Exception\Forbidden;
32+
use Sabre\DAV\Exception\MethodNotAllowed;
3233
use Sabre\DAV\ICollection;
3334

3435
class UploadHome implements ICollection {
@@ -58,9 +59,7 @@ public function getChild($name): UploadFolder {
5859
}
5960

6061
public function getChildren(): array {
61-
return array_map(function ($node) {
62-
return new UploadFolder($node, $this->cleanupService, $this->getStorage());
63-
}, $this->impl()->getChildren());
62+
throw new MethodNotAllowed('Listing members of this collection is disabled');
6463
}
6564

6665
public function childExists($name): bool {

0 commit comments

Comments
 (0)