Comments (2)
Yes, this is clearly buggy in the cluster impl and worse yet in the general access control APIs. It does:
if (i < oldCount)
{
ReturnErrorOnFailure(GetAccessControl().UpdateEntry(&aDecoder.GetSubjectDescriptor(), accessingFabricIndex, i,
iterator.GetValue().GetEntry()));
}
else
{
ReturnErrorOnFailure(GetAccessControl().CreateEntry(&aDecoder.GetSubjectDescriptor(), accessingFabricIndex, nullptr,
iterator.GetValue().GetEntry()));
}
where CreateEntry
and UpdateEntry
have logic like so:
ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT);
IsValid() checks various stuff that should lead to CONSTRAINT_ERROR bits or whatnot, not ERROR, but the thing it's returning will get mapped to Error.
Then CreateEntry
calls into the access control delegate, which will return whatever it returns. It seems to be doing things like:
ReturnErrorCodeIf(subjectCount > EntryStorage::kMaxSubjects, CHIP_ERROR_BUFFER_TOO_SMALL);
in ExampleAccessControlDelegate
, so could conceivably be changed to return the right IM error, but the API is entirely undocumented so other implementations of the delegate may well keep doing the wrong thing.
So we need to:
- Really improve the tests here.
- Make sure there are cert tests for this (there clearly are not right now).
- Fix the implementation and/or APIs to follow the spec.
from connectedhomeip.
Yes in this case the failure is correctly detected but an inadequately detailed failure code is returned.
from connectedhomeip.
Related Issues (20)
- [CERT-TEST-FAILURE] [TC-EEVSEM-3.3] Test failing due to CurrentMode value missmatch with OnMode value HOT 1
- Test DCL API needed in context of JF
- ServiceArea: constructors with many args + assignment operator not making identical copy HOT 1
- [1.3] Problem about the Chip-tool Any command HOT 1
- ESP32 with Google home mini HOT 1
- Add support for Presets attribute and commands to write presets attribute for Thermostat cluster
- [1.3] BatPercentRemaining Attribute display 'ERROR'in Google Home HOT 1
- Disallow SDK consumers from using unsanitary methods HOT 2
- Stop using the `a*` pattern for method input parameters HOT 1
- For the Thermostat presets delegate implementation we do not support deletion of presets. HOT 1
- [1.3] TriggerEffect Command (0x40) in the Identify Cluster: Constraint Ranges and Default Value Ambiguity
- [1.3] The Commands in the Scene Management Cluster Do Not Obey the Constraint Ranges HOT 1
- [1.3] OnWithTimedOff 0x42 Command Parameter Issues HOT 1
- For presets edit requests, when a fabric is removed we need to cancel any edit request from a node in that fabric HOT 1
- [Feature] Implements the Ecosystem Information Server in Matter SDK HOT 1
- [1.3] The Commands in the Level Control Cluster Do Not Obey the Constraint Ranges HOT 1
- [Feature] Add EcosystemInfo to chip-repl HOT 1
- Add support for multiple presets of a given type in the thermostat app for linux HOT 2
- [Platform] Linux Yocto, kernel 5.15 HOT 7
- Follow up issue on WHM implmentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connectedhomeip.