From a6eb9d5a7cd2dd54ca754c2dc26b885121bb2d5f Mon Sep 17 00:00:00 2001 From: David Christofas Date: Wed, 10 Nov 2021 17:00:42 +0100 Subject: [PATCH] fix nil pointer during propfinds (#2257) --- changelog/unreleased/public-share-share-types.md | 1 + internal/http/services/owncloud/ocdav/propfind.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/public-share-share-types.md b/changelog/unreleased/public-share-share-types.md index 6854c32e9d..2980379d35 100644 --- a/changelog/unreleased/public-share-share-types.md +++ b/changelog/unreleased/public-share-share-types.md @@ -3,3 +3,4 @@ Enhancement: Add public link share type to propfind response Added share type for public links to propfind responses. https://github.com/cs3org/reva/pull/2213 +https://github.com/cs3org/reva/pull/2257 diff --git a/internal/http/services/owncloud/ocdav/propfind.go b/internal/http/services/owncloud/ocdav/propfind.go index 6fc2854f01..7458f378bf 100644 --- a/internal/http/services/owncloud/ocdav/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind.go @@ -777,8 +777,10 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide types.WriteString("") } - if _, ok := linkshares[md.Id.OpaqueId]; ok { - types.WriteString("3") + if md.Id != nil { + if _, ok := linkshares[md.Id.OpaqueId]; ok { + types.WriteString("3") + } } if types.Len() != 0 {