diff --git a/pkg/services/object/patch/streamer.go b/pkg/services/object/patch/streamer.go index 85c28cda0..c3f686d72 100644 --- a/pkg/services/object/patch/streamer.go +++ b/pkg/services/object/patch/streamer.go @@ -63,6 +63,14 @@ func (s *Streamer) init(ctx context.Context, req *objectV2.PatchRequest) error { return err } + if hdrWithSig.GetHeader().GetObjectType() != objectV2.TypeRegular { + return errors.New("non-regular object can't be patched") + } + + if hdrWithSig.GetHeader().GetEC() != nil || hdrWithSig.GetHeader().GetSplit() != nil { + return errors.New("complex object parts can't be patched") + } + commonPrm, err := util.CommonPrmFromV2(req) if err != nil { return err