-
Notifications
You must be signed in to change notification settings - Fork 121
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
Missing validation of request PDU parameters #112
Comments
Limited by Modbus message size, please refer to the spec.
|
But I can read 126 contiguous registers. one more than the spec. |
This bug affects multiple function codes. Currently there are no semantic, client-side parameters according to the Modbus protocol validations in place. If a parameter value could technically be serialized it is accepted, even if the Modbus protocol specifies more restrictive, semantic bounds. Ideally servers should reject such non-standard requests. Not a severe bug as clients are responsible for sending valid requests and servers are advised to reject invalid requests. Enforcing strict standard behavior by the library may even prevent using custom, vendor-specific extensions. |
Not a bug, it's a "feature". If those additional conformance checks are implemented then they should be hidden behind a feature flag. Not everyone might need or want them. |
This affects both the client and the server. |
I've found that I can read at most 126 input registers with
read_input_registers()
. But why 126? Which part of the source code should I read.The text was updated successfully, but these errors were encountered: