From a733b6fd8ad0d1eb2d430db396ded68b6d6b925f Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 30 Aug 2023 16:43:25 +0200 Subject: [PATCH] fix missing etag in shares jail Signed-off-by: jkoberg --- changelog/unreleased/fix-missing-sharesjail-etag.md | 5 +++++ .../services/sharesstorageprovider/sharesstorageprovider.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-missing-sharesjail-etag.md diff --git a/changelog/unreleased/fix-missing-sharesjail-etag.md b/changelog/unreleased/fix-missing-sharesjail-etag.md new file mode 100644 index 0000000000..77fb57179c --- /dev/null +++ b/changelog/unreleased/fix-missing-sharesjail-etag.md @@ -0,0 +1,5 @@ +Bugfix: Fix missing etag in shares jail + +The shares jail can miss the etag if the first `receivedShare` is not accepted. + +https://github.com/cs3org/reva/pull/4140 diff --git a/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go b/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go index 3176bb0ae5..e363aec269 100644 --- a/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go +++ b/internal/grpc/services/sharesstorageprovider/sharesstorageprovider.go @@ -1167,7 +1167,7 @@ func findEarliestShare(receivedShares []*collaboration.ReceivedShare, shareInfo } switch { - case earliestShare == nil: + case earliestShare == nil && hasCurrentMd: earliestShare = current // ignore if one of the shares has no metadata case !hasEarliestMd || !hasCurrentMd: