-
Notifications
You must be signed in to change notification settings - Fork 14
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
*: Convert slices to arrays instead of copy
where possible
#595
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #595 +/- ##
==========================================
- Coverage 39.47% 39.47% -0.01%
==========================================
Files 150 147 -3
Lines 17594 17494 -100
==========================================
- Hits 6946 6906 -40
+ Misses 10269 10213 -56
+ Partials 379 375 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked if it is possible to stop our nodes with this SDK version via some bad request? If no, is it a piece of luck or we have good validation checks in all the cases I threaded?
Signed-off-by: Leonard Lyubich <[email protected]>
Previously, `Unmarshal`/`UnmarshalJSON` methods accepted any ID length: - those that were shorter were padded with zeros; - those that were longer were cut off. This behavior is not declared in the protocol, thus it was incorrect and could cover potential client/transport bugs. Now the length is strictly checked. In particular, corresponding unit test now passes. Signed-off-by: Leonard Lyubich <[email protected]>
`NewTableFromV2` function does not check the length accepts any container ID length: - those that were shorter were padded with zeros; - those that were longer were cut off. This behavior is incorrect because it goes against the NeoFS API protocol. However, it is not possible to fix the function backwards compatible since it does not return an error. Thus, a new `ReadFromV2` method is added (it is already widely used in the library). The method checks container ID format and returns an error. Consequently, now the eACL format is also correctly checked when decoding a bearer token and `ContainerService.GetExtendedACLResponse` protocol message by the API client. `NewTableFromV2` is marked buggy and deprecated, it's going to be purged for release later. Signed-off-by: Leonard Lyubich <[email protected]>
Became possible with Go 1.20. Signed-off-by: Leonard Lyubich <[email protected]>
No description provided.