fix TypeError when a hostless target is sorted against a /32 - #3391
Open
liquidsec wants to merge 1 commit into
Open
fix TypeError when a hostless target is sorted against a /32#3391liquidsec wants to merge 1 commit into
liquidsec wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3391 +/- ##
=====================================
+ Coverage 90% 90% +1%
=====================================
Files 454 454
Lines 46937 46949 +12
=====================================
+ Hits 42196 42213 +17
+ Misses 4741 4736 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
📊 Performance Benchmark Report
📈 Detailed Results (All Benchmarks)
🎯 Performance Summary✅ No significant performance changes detected (all changes <10%) 🐍 Python Version 3.11.16 |
liquidsec
added a commit
that referenced
this pull request
Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3390
The hostless sort sentinel in
Target.add()was(0, 0), buthost_size_key()returns(size, str). An explicitly-masked single address has size0, so batching a hostless entry (BLACKLIST_REGEX) with a/32or/128tied on the first element and compared0against astr:Reachable with no user-written
RE:at all, since thespiderpreset ships a blacklist regex:Changes the sentinel to
(0, ""). Hostless entries are dropped before the radix tree (_addreturns early onhost is None), so their sort position is irrelevant and only the type matters.Adds a regression test covering
/32and/128batched with hostless entries in a singleadd(), plus a mixed batch of every host form.