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

chip-tool accesscontrol write acl accepts any random arguments #21892

Closed
bluebin14 opened this issue Aug 15, 2022 · 6 comments · Fixed by #25297
Closed

chip-tool accesscontrol write acl accepts any random arguments #21892

bluebin14 opened this issue Aug 15, 2022 · 6 comments · Fixed by #25297

Comments

@bluebin14
Copy link
Contributor

Problem

chip-tool accesscontrol write acl accepts any random arguments, e.g.

./chip-tool accesscontrol write acl '[{"water":123,"privilege":5,"authMode":2,"subjects":[],"targets":null}]' 12344321 0

Proposed Solution

Do not accept random arguments.

@bluebin14
Copy link
Contributor Author

This is true for all JSON parsing, not just acesscontrol.

@bzbarsky-apple
Copy link
Contributor

@bluebin14 So just to make sure I understand, the issue there is the "water": 123 not leading to an error?

@bluebin14
Copy link
Contributor Author

@bzbarsky-apple yes I was asked to file an issue so someone can determine if it's an issue or not. It came up when incorrect fabricId was being passed which are now ignored anyway.

@bzbarsky-apple
Copy link
Contributor

@bluebin14 fabricId, or fabricIndex? (I suspect the fix for fabricIndex would be a bit different from the fix for general "not a known member"....)

@bluebin14
Copy link
Contributor Author

fabricIndex

@bzbarsky-apple
Copy link
Contributor

Ok. The fabricIndex bit is in fact allowed to be sent by the spec, so excluding it would be a bit odd.

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Feb 24, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes project-chip#21892
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Feb 24, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes project-chip#21892
andy31415 pushed a commit that referenced this issue Feb 24, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes #21892
kkasperczyk-no pushed a commit to kkasperczyk-no/sdk-connectedhomeip that referenced this issue Mar 15, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes project-chip/connectedhomeip#21892
kkasperczyk-no pushed a commit to kkasperczyk-no/sdk-connectedhomeip that referenced this issue Mar 15, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes project-chip/connectedhomeip#21892
lecndav pushed a commit to lecndav/connectedhomeip that referenced this issue Mar 22, 2023
This helps catch cases when someone mis-types the name of an optional struct
field.

Fixes project-chip#21892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants