diff --git a/changelog/unreleased/received-share-path.md b/changelog/unreleased/received-share-path.md new file mode 100644 index 0000000000..9958a34cf8 --- /dev/null +++ b/changelog/unreleased/received-share-path.md @@ -0,0 +1,6 @@ +Bugfix: Fix the shareroot path in REPORT responses + +Fixed the shareroot path in REPORT responses. Before this change the attribute leaked part of the folder tree of the sharer. + +https://github.com/owncloud/ocis/pull/4859 +https://github.com/owncloud/ocis/issues/4796 diff --git a/services/search/pkg/search/provider/searchprovider.go b/services/search/pkg/search/provider/searchprovider.go index 1bfe01286b..5201daf98c 100644 --- a/services/search/pkg/search/provider/searchprovider.go +++ b/services/search/pkg/search/provider/searchprovider.go @@ -202,7 +202,8 @@ func (p *Provider) Search(ctx context.Context, req *searchsvc.SearchRequest) (*s SpaceId: spid, OpaqueId: oid, } - rootName = space.GetRootInfo().GetPath() + + rootName = filepath.Join("/", filepath.Base(gpRes.GetPath())) permissions = space.GetRootInfo().GetPermissionSet() p.logger.Debug().Interface("grantSpace", space).Interface("mountpointRootId", mountpointRootID).Msg("searching a grant") case "personal":