-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
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? |
Set User Type is Zigbe-only. The Matter equivalent is SetUser. The question is whether SetUser validates the user type it's passed @mykrupp |
#19813 This PR took care of it for SetUser |
Perfect! |
Problem
In
emberAfDoorLockClusterSetUserTypeCallback
and insetUser
we have auint8_t userType
that we are casting toEmberAfDoorLockUserType
, 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
The text was updated successfully, but these errors were encountered: