Repository navigation
better JSON parse error handling - #5484
softhack007 wants to merge 8 commits into
Conversation
* malformed / too big wsec.json and cfg.json are treated as read error * debug_print JSON parse errors
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. WalkthroughJSON file reads now report selected deserialization errors. Configuration loading handles failed or overflowed documents, rejects invalid security configuration, and caps Wi-Fi list resizing at ChangesConfiguration JSON handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue remains from this review; the reported timer ambiguity predates this change and does not block merging it. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Validation and Wi-Fi limits improve input handling. However, rejecting a partially readable security file can leave a previously PIN-protected device running without its configured PIN. Network exposure depends on connectivity and recovery settings, and a later save can persist that fallback state. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
overlooked this one
| success = readObjectFromFile(s_cfg_json, nullptr, pDoc); | ||
|
|
||
| bool success = readObjectFromFile(s_cfg_json, nullptr, pDoc); | ||
| if (!success || (pDoc->overflowed())) pDoc->clear(); // corrupted/too-large → same as missing: seed defaults |
There was a problem hiding this comment.
could restore the backup first before giving up but need to check that will not result in an infinite loop
There was a problem hiding this comment.
good point 👍 can you look into that? I'm quite busy atm with holiday trip preparations 😃
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
This is a robustness improvement - the original problem always existed so not a regression w.r.t. 0.15.x. Would be ok for me if we move this PR to 16.1. |
This is also a security improvement together with #5482
Summary by CodeRabbit