aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-13 17:28:36 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-26 10:35:37 +0200
commit164d9988567ea46e88c6a968520a71b9b91315b8 (patch)
tree0fcd06bc787535818afe5fd4653570d9bc30996a /apps/dav
parentb3e7865d9b3a88647107220fd9ac08f0d80ae1cd (diff)
downloadnextcloud-server-164d9988567ea46e88c6a968520a71b9b91315b8.tar.gz
nextcloud-server-164d9988567ea46e88c6a968520a71b9b91315b8.zip
No listing
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Direct/DirectHome.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/apps/dav/lib/Direct/DirectHome.php b/apps/dav/lib/Direct/DirectHome.php
index 3440a55dc18..9a3ee58224b 100644
--- a/apps/dav/lib/Direct/DirectHome.php
+++ b/apps/dav/lib/Direct/DirectHome.php
@@ -29,6 +29,7 @@ use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use Sabre\DAV\Exception\Forbidden;
+use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\ICollection;
@@ -59,23 +60,14 @@ class DirectHome implements ICollection {
return new DirectFile($direct, $this->rootFolder);
} catch (DoesNotExistException $e) {
+ //TODO: throttle the ip to avoid brute forcing
+
throw new NotFound();
}
}
function getChildren() {
- $adminFolder = $this->rootFolder->getUserFolder('admin');
-
- $listing = $adminFolder->getDirectoryListing();
-
- $res = [];
- foreach ($listing as $file) {
- if ($file instanceof File) {
- $res[] = new DirectFile($file);
- }
- }
-
- return $res;
+ throw new MethodNotAllowed('Listing members of this collection is disabled');
}
function childExists($name) {