forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
54d6f3de55
commit
7c1432aa57
1 changed files with 1 additions and 5 deletions
|
@ -2,7 +2,6 @@ package container
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg"
|
"github.com/nspcc-dev/neofs-api-go/pkg"
|
||||||
eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl"
|
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) {
|
func (s *morphExecutor) Put(ctx containerSvc.ContextWithToken, body *container.PutRequestBody) (*container.PutResponseBody, error) {
|
||||||
cnr, err := containerSDK.NewVerifiedFromV2(body.GetContainer())
|
cnr := containerSDK.NewContainerFromV2(body.GetContainer())
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("invalid format of the container structure: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
cnr.SetSignature(
|
cnr.SetSignature(
|
||||||
pkg.NewSignatureFromV2(body.GetSignature()),
|
pkg.NewSignatureFromV2(body.GetSignature()),
|
||||||
|
|
Loading…
Reference in a new issue