Skip to content

Conversation

@lidel
Copy link
Member

@lidel lidel commented Dec 20, 2025

Belt-and-suspenders defense against corrupted address data:

  • contentrouter: filters nil addresses when building AddrInfo
  • types/ipfs.go: Multiaddr.MarshalJSON returns null for nil (should never happen, but just in case, this will produce loud and clear error)

Should help with ipfs/kubo#11116

Belt-and-suspenders defense against corrupted address data:
- types/ipfs.go: Multiaddr.MarshalJSON returns null for nil
- contentrouter: filters nil addresses when building AddrInfo

Should help with ipfs/kubo#11116
@codecov
Copy link

codecov bot commented Dec 20, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.14%. Comparing base (f76a2a7) to head (e40a070).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
routing/http/types/ipfs.go 50.00% 1 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1081      +/-   ##
==========================================
+ Coverage   61.09%   61.14%   +0.05%     
==========================================
  Files         264      264              
  Lines       26222    26225       +3     
==========================================
+ Hits        16020    16035      +15     
+ Misses       8524     8515       -9     
+ Partials     1678     1675       -3     
Files with missing lines Coverage Δ
routing/http/contentrouter/contentrouter.go 54.97% <100.00%> (+1.25%) ⬆️
routing/http/types/ipfs.go 60.00% <50.00%> (-1.91%) ⬇️

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- extract filterAddrs() to deduplicate nil-filtering logic
- preallocate slice per review feedback
- extend nil multiaddr protection to FindPeer and GetClosestPeers
- update test to expect empty slices instead of nil

addresses review feedback on #1081
@lidel lidel marked this pull request as ready for review January 7, 2026 18:45
@lidel lidel requested a review from a team as a code owner January 7, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants