Skip to content

Commit a43cbd2

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

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 {
@@ -59,9 +60,7 @@ public function getChild($name): UploadFolder {
5960
}
6061

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

6766
public function childExists($name): bool {

0 commit comments

Comments
 (0)