Oracle: neofs result size limit#803
Conversation
| "header" => GetHeaderAsync(client, objectAddr, tokenSource.Token), | ||
| "hash" => GetHashAsync(client, objectAddr, ps.Skip(3).ToArray(), tokenSource.Token), | ||
| "range" => await GetRangeAsync(client, objectAddr, ps.Skip(3).ToArray(), tokenSource.Token), | ||
| "header" => (OracleResponseCode.Success, await GetHeaderAsync(client, objectAddr, tokenSource.Token)), |
There was a problem hiding this comment.
Just for the record: while GetPayload and GetRangeAsync methods are fixed, the same problem exists with GetHeader. Unfortunately, this problem exists on the NeoFS-API level (the object header size isn't restricted at the API lievel) and can't be easily fixed in the OracleNeoFSProtocol for now. We'll track this issue in nspcc-dev/neofs-api#171.
There was a problem hiding this comment.
GetHashAsync is also affected, because it also uses client.GetObjectHeader under the hood.
I will test and add ut. |
shargon
left a comment
There was a problem hiding this comment.
Seems good, waiting for the UT
|
I test locally with fs object in testnet. @shargon I have no idea how to add ut. All classes and methods in oracle service are |
|
@ZhangTao1596 please accept the license, and we can merge it |
@dotnet-policy-service agree |
* Add oracle limit * AnnaShaleva review * Update src/OracleService/Protocols/OracleHttpsProtocol.cs Co-authored-by: Erik Zhang <erik@neo.org> * Add Response length * Update src/OracleService/Protocols/OracleHttpsProtocol.cs Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com> * New version Extracted from: https://github.com/microsoft/referencesource/blob/51cf7850defa8a17d815b4700b67116e3fa283c2/System/net/System/Net/Http/HttpContent.cs#L91 * Fix * Clean * Read one more * oracle: neofs result size limit (#803) * Enforce UTF8 * Update src/OracleService/Protocols/OracleHttpsProtocol.cs Co-authored-by: Anna Shaleva <shaleva.ann@gmail.com> --------- Co-authored-by: Erik Zhang <erik@neo.org> Co-authored-by: Owen Zhang <38493437+superboyiii@users.noreply.github.com> Co-authored-by: ZhangTao <zhangtao@ngd.neo.org> Co-authored-by: Anna Shaleva <shaleva.ann@gmail.com>


Fix #800 (comment)
@shargon @AnnaShaleva