-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix decoding failure from large doxm.sct value and improve error messages #499
Conversation
… uint8 which leads to a failed decoding of Doxm resource.
WalkthroughThe changes include modifications to the error handling in the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant VNDOCFCBORCodec
participant Decoder
Client->>VNDOCFCBORCodec: Call Decode()
VNDOCFCBORCodec->>Decoder: Attempt to decode
Decoder-->>VNDOCFCBORCodec: Return error
VNDOCFCBORCodec-->>Client: Return enhanced error message
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #499 +/- ##
=======================================
Coverage 76.78% 76.78%
=======================================
Files 122 122
Lines 7236 7236
=======================================
Hits 5556 5556
Misses 1090 1090
Partials 590 590 ☔ View full report in Codecov by Sentry. |
… 255 (#499) * The default value of doxm.sct set by iotivity-lite can be larger than uint8 which leads to a failed decoding of Doxm resource.
The default value of doxm.sct set by iotivity-lite can be larger than uint8 which leads to a failed decoding of Doxm resource.
I have found out that this default doxm config set by IoTivity-Lite https://github.com/iotivity/iotivity-lite/blob/master/security/oc_doxm.c#L231 could result in the sct=457. As the sct is in the scheme uint8 the decoding fails.
I have also extended the error message as it can save a lot of time in future by providing what exactly went wrong.
Summary by CodeRabbit
Bug Fixes
New Features
CredentialType
by changing its data type fromuint8
touint16
.