Repository navigation
backport: bitcoin#35117 i2p: clean up SAM error logging - #7661
PastaPastaPasta merged 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. WalkthroughThe I2P session error paths no longer include raw reply content. Unexpected-RESULT errors now use the sanitized request, which masks the private key in Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change redacts I2P session destination private keys from relevant error diagnostics while retaining useful request context. No current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
🔍 Review in progress — actively reviewing now (commit cf8dbda) · triage: critical · Phase 2 only (queue backlog) |
knst
left a comment
There was a problem hiding this comment.
do backport bitcoin#35117 instead ; regressions tests also non-needed here IMO
| if (check_result_ok && reply.Get("RESULT") != "OK") { | ||
| throw std::runtime_error( | ||
| strprintf("Unexpected reply to \"%s\": \"%s\"", request, reply.full)); | ||
| strprintf("Unexpected reply to \"%s\": \"%s\"", reply.request, reply.full)); |
There was a problem hiding this comment.
do backport bitcoin#35117 instead ; regressions tests also non-needed here IMO
SESSION CREATE requests can contain the I2P private key. Keep using the redacted request text in error messages, and avoid echoing raw SAM replies in the generic reply error path. This keeps the error useful while avoiding logging either the private-key-bearing request or unescaped router-controlled reply bytes. No network behavior change is intended. (cherry picked from commit b6c3670)
1b6e55c to
cf8dbda
Compare
Issue being fixed or feature implemented
A failed I2P SAM
SESSION CREATErequest can expose the persistent destination private key in the node log. Generic SAM errors also echo raw router-controlled replies.What was done?
Backport bitcoin#35117, commit
b6c367044288f83ab61c1a77ad34c33adf39ecf6, without code changes. Use the existing redacted request for non-OK results and omit raw replies from both non-OK and missing-field errors. The complete upstream patch is included; no prerequisites or hunks are omitted.How Has This Been Tested?
make -j15../src/test/test_dash --run_test=i2p_tests --log_level=message(3 cases passed).p2p_i2p_ports.pyandp2p_i2p_sessions.py(both passed using the existing Python environment withdash_hash).Breaking Changes
No network behavior changes. Generic SAM error messages no longer include raw router replies.
Checklist:
This pull request was created by Codex.