Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict maximum size of ObjectHead Oracle NeoFS response #3025

Closed
AnnaShaleva opened this issue May 29, 2023 · 1 comment
Closed

Restrict maximum size of ObjectHead Oracle NeoFS response #3025

AnnaShaleva opened this issue May 29, 2023 · 1 comment
Labels
bug Something isn't working oracle Oracle service and contract

Comments

@AnnaShaleva
Copy link
Member

AnnaShaleva commented May 29, 2023

The problem is described at nspcc-dev/neofs-api#171 (comment) and similar to neo-project/neo-modules#803. Currently the size of received object header isn't restricted in any way, getHeader and getHash Oracle NeoFS protocol methods are affected. See the usages of getObjHeader:

func getObjHeader(ctx context.Context, c *client.Client, addr *oid.Address) (*object.Object, error) {
var headPrm client.PrmObjectHead
headPrm.FromContainer(addr.Container())
headPrm.ByID(addr.Object())
res, err := c.ObjectHead(ctx, headPrm)
if err != nil {
return nil, err
}
var obj = object.New()
if !res.ReadHeader(obj) {
return nil, errors.New("missing header in the reply")
}
return obj, nil
}

@AnnaShaleva AnnaShaleva added bug Something isn't working oracle Oracle service and contract labels May 29, 2023
@roman-khimov
Copy link
Member

To be fixed by nspcc-dev/neofs-api#262, nothing to do on NeoGo side.

@roman-khimov roman-khimov closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working oracle Oracle service and contract
Projects
None yet
Development

No branches or pull requests

2 participants