From 18f008f7c791ad5f30a8203640c04a1451156a0c Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Fri, 17 Sep 2021 18:21:24 -0400 Subject: [PATCH] Fix retention enforcement check for deleted object versions (#13240) if an object is pending version purge, it should be treated as ErrNone in retention enforcement check --- cmd/bucket-object-lock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bucket-object-lock.go b/cmd/bucket-object-lock.go index 465447b82..742a45dc5 100644 --- a/cmd/bucket-object-lock.go +++ b/cmd/bucket-object-lock.go @@ -93,7 +93,7 @@ func enforceRetentionBypassForDelete(ctx context.Context, r *http.Request, bucke if gerr != nil { // error from GetObjectInfo switch gerr.(type) { case MethodNotAllowed: // This happens usually for a delete marker - if oi.DeleteMarker { + if oi.DeleteMarker || !oi.VersionPurgeStatus.Empty() { // Delete marker should be present and valid. return ErrNone }