From b4f15e31c9f8cda3f25996af85f194ef89dd506e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 14 May 2021 14:12:04 +0200 Subject: [PATCH] Only return workspace property for top node in a propfind request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/DAV/WorkspacePlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index 401b760847f..a7c7e896b06 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -93,7 +93,9 @@ public function propFind(PropFind $propFind, INode $node) { if (!$workspaceAvailable || !$workspaceEnabled) { return; } - if ($propFind->getDepth() > 0) { + + // Only return the property for the parent node and ignore it for further in depth nodes + if ($propFind->getDepth() === $this->server->getHTTPDepth()) { $propFind->handle(self::WORKSPACE_PROPERTY, function () use ($node) { /** @var Folder[] $nodes */ $nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId());