-
Notifications
You must be signed in to change notification settings - Fork 100
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
Ensure max length #845
Ensure max length #845
Conversation
We can wait for #815 |
Inspired by neo-project/neo-modules#845. Signed-off-by: Roman Khimov <roman@nspcc.ru>
@@ -166,6 +166,11 @@ private static JObject ToJson(StackItem item, Session session) | |||
|
|||
private static Signer[] SignersFromJson(JArray _params, ProtocolSettings settings) | |||
{ | |||
if (_params.Count > Transaction.MaxTransactionAttributes) | |||
{ | |||
throw new RpcException(-100, "Max allowed witness exceeded."); |
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 max allowed witness conditions been fixed in neo-core or here? like |
Must be on both, here is composed manually, not deserialized. |
@shargon , grand master, can we have a sole project where all limits are set together? the existing limitations are like here and there, hard to follow and track. |
Agree, but the limits are during deserialization, and here the object is composed manually, so the nodes are protected, but no the rpc node, I think |
I will merge it, #815 is delayed and it can replace this throw later |
* 'master' of github.com:neo-project/neo-modules: Ensure max length (neo-project#845) Update .editorconfig and run code analyze (neo-project#866) Added AspNetCore (neo-project#863) RcpServer: Fixed CORS and Basic Auth (neo-project#812) Fix response from getversion due to WS removal (neo-project#859) Local dev setup (neo-project#861)
Related to: #827 (comment)