[#660] services/container: Don't check container format in Put

Storage node should only reflect container Put requests to sidechain w/o any
validation. All verification steps are performed by IR.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2021-07-02 08:59:02 +03:00 committed by Alex Vanin
parent 54d6f3de55
commit 7c1432aa57
1 changed files with 1 additions and 5 deletions

View File

@ -2,7 +2,6 @@ package container
import (
"context"
"fmt"
"github.com/nspcc-dev/neofs-api-go/pkg"
eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl"
@ -28,10 +27,7 @@ func NewExecutor(w *wrapper.Wrapper) containerSvc.ServiceExecutor {
}
func (s *morphExecutor) Put(ctx containerSvc.ContextWithToken, body *container.PutRequestBody) (*container.PutResponseBody, error) {
cnr, err := containerSDK.NewVerifiedFromV2(body.GetContainer())
if err != nil {
return nil, fmt.Errorf("invalid format of the container structure: %w", err)
}
cnr := containerSDK.NewContainerFromV2(body.GetContainer())
cnr.SetSignature(
pkg.NewSignatureFromV2(body.GetSignature()),