From 07b59638c46e5b0baab70ab16f9ce43185b78d69 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 7 Jun 2022 15:36:33 +0200 Subject: [PATCH] fix propfinds with depth 0 --- changelog/unreleased/depth-zero-propfind.md | 6 ++++++ internal/http/services/owncloud/ocdav/propfind/propfind.go | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/depth-zero-propfind.md diff --git a/changelog/unreleased/depth-zero-propfind.md b/changelog/unreleased/depth-zero-propfind.md new file mode 100644 index 0000000000..c600e4ae47 --- /dev/null +++ b/changelog/unreleased/depth-zero-propfind.md @@ -0,0 +1,6 @@ +Bugfix: Fix propfinds with depth 0 + +Fixed the response for propfinds with depth 0. The response now doesn't contain the shares jail anymore. + +https://github.com/owncloud/ocis/issues/3704 +https://github.com/cs3org/reva/pull/2918 diff --git a/internal/http/services/owncloud/ocdav/propfind/propfind.go b/internal/http/services/owncloud/ocdav/propfind/propfind.go index 39d7dc48cd..796a365184 100644 --- a/internal/http/services/owncloud/ocdav/propfind/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind/propfind.go @@ -463,7 +463,8 @@ func (p *Handler) getResourceInfos(ctx context.Context, w http.ResponseWriter, r resourceInfos := []*provider.ResourceInfo{ rootInfo, // PROPFIND always includes the root resource } - if rootInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE { + + if rootInfo.Type == provider.ResourceType_RESOURCE_TYPE_FILE || depth == net.DepthZero { // If the resource is a file then it can't have any children so we can // stop here. return resourceInfos, true, true