Skip to content

Commit

Permalink
morph: Fix linter
Browse files Browse the repository at this point in the history
Linter message: staticcheck SA1019: eaclSDK.NewTableFromV2 is deprecated: BUG: container ID length is not checked. Use [Table.ReadFromV2] instead.

Signed-off-by: Evgenii Baidakov <[email protected]>
  • Loading branch information
smallhive committed Aug 12, 2024
1 parent 725d402 commit b4c786e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/services/container/morph/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,15 @@ func (s *morphExecutor) SetExtendedACL(_ context.Context, tokV2 *sessionV2.Token
return nil, errors.New("missing signature")
}

var table eaclSDK.Table
if eacl := body.GetEACL(); eacl != nil {
if err := table.ReadFromV2(*body.GetEACL()); err != nil {
return nil, fmt.Errorf("invalid eACL: %w", err)
}
}

eaclInfo := containercore.EACL{
Value: eaclSDK.NewTableFromV2(body.GetEACL()),
Value: &table,
}

err := eaclInfo.Signature.ReadFromV2(*sigV2)
Expand Down

0 comments on commit b4c786e

Please sign in to comment.