Skip to content

Commit

Permalink
fix nil pointer during propfinds (#2257)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas authored Nov 10, 2021
1 parent 63cd968 commit a6eb9d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/public-share-share-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions internal/http/services/owncloud/ocdav/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,10 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide
types.WriteString("</oc:share-type>")
}

if _, ok := linkshares[md.Id.OpaqueId]; ok {
types.WriteString("<oc:share-type>3</oc:share-type>")
if md.Id != nil {
if _, ok := linkshares[md.Id.OpaqueId]; ok {
types.WriteString("<oc:share-type>3</oc:share-type>")
}
}

if types.Len() != 0 {
Expand Down

0 comments on commit a6eb9d5

Please sign in to comment.