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

Need to validate userType values in door lock server #3580

Closed
bzbarsky-apple opened this issue Nov 2, 2020 · 7 comments
Closed

Need to validate userType values in door lock server #3580

bzbarsky-apple opened this issue Nov 2, 2020 · 7 comments
Labels
app-clusters Application cluster work data model p1 priority 1 work stale Stale issue or PR V1.X
Milestone

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

In emberAfDoorLockClusterSetUserTypeCallback and in setUser we have a uint8_t userType that we are casting to EmberAfDoorLockUserType, but nothing makes sure that it's a valid value.

Proposed Solution

Add a check. I'm not sure how best to do that, given the enum is generated. Maybe we could
add something in the generated code that lets us check whether the value is valid for a given enum?

@vivien-apple

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.62. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Aug 13, 2022
@bzbarsky-apple
Copy link
Contributor Author

This might not be relevant with the door lock cluster rewrites (and the fact that the "Set User Type" command is gone to start with in Matter)....

@mykrupp can you confirm that this is not an issue anymore, please?

@mykrupp
Copy link
Contributor

mykrupp commented Aug 26, 2022

I don't see emberAfDoorLockClusterSetUserTypeCallback in the connectedhomeip repo anywhere.

Although 4.26 in the doorlock spec indicates that Set User Type should be there. Was it decided at some point to remove the Set User Type command from matter?
Screen Shot 2022-08-26 at 7 58 29 AM

@bzbarsky-apple
Copy link
Contributor Author

Set User Type is Zigbe-only. The Matter equivalent is SetUser. The question is whether SetUser validates the user type it's passed @mykrupp

@mykrupp
Copy link
Contributor

mykrupp commented Aug 28, 2022

#19813 This PR took care of it for SetUser

@bzbarsky-apple
Copy link
Contributor Author

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-clusters Application cluster work data model p1 priority 1 work stale Stale issue or PR V1.X
Projects
None yet
Development

No branches or pull requests

5 participants