Repository navigation
fix(network): refine address classification - #45230
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45230 +/- ##
=======================================
Coverage 83.08% 83.08%
=======================================
Files 3028 3028
Lines 196549 196555 +6
Branches 45899 45902 +3
=======================================
+ Hits 163310 163316 +6
Misses 30015 30015
Partials 3224 3224
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aminghadersohi
left a comment
There was a problem hiding this comment.
One change: the 6to4 branch loosens the check on current Python patch releases instead of tightening it; the three linked suggestions refuse 2002::/16 outright.
…ardening # Conflicts: # UPDATING.md
CodeAnt PR Risk: Medium Risk
Assessed commit: |
aminghadersohi
left a comment
There was a problem hiding this comment.
Approving at 149c2d7: the 6to4 refusal, test row and UPDATING.md note landed, CI is green, and the check is never looser than master on Python 3.11.9 or 3.11.15. Non-blocking: the is_safe_ip docstring still mentions only the IPv4-mapped unwrap.
|
On the CodeAnt risk summary: operator-specific NAT64 prefixes can't be recognised from the address alone, so detecting them would need operator configuration, which is out of scope for this |
|
Thanks @aminghadersohi — addressed the non-blocking docstring note from your approval in b3e0f12679. The docstring matches UPDATING.md: mapped and well-known NAT64 addresses are checked via embedded IPv4; local-use translation, IPv4-compatible, 6to4 and Teredo forms are refused outright; operator-specific prefixes are not detected. Docstring only, no classification behavior changed. All 1,293 utils tests and changed-file hooks passed. Updated and reviewed with Codex. |
(cherry picked from commit 0f875ca)
SUMMARY
is_safe_ipnow classifies a few more IPv6 address forms by what they actually point at:64:ff9b::/96) addresses are checked using their embedded IPv4 address.64:ff9b:1::/48), IPv4-compatible (::/96), 6to4 (2002::/16) and Teredo (2001::/32) addresses are refused.Callers are unchanged: OAuth2 token requests, webhooks, URL dataset import and the Impala checks keep their request paths and their existing
*_ALLOW_INTERNAL_HOSTSsettings.UPDATING.mdnotes the change.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (backend).
TESTING INSTRUCTIONS
pytest tests/unit_tests/utils/test_network.py: new rows pin the classification of each address form; the public-embedded 6to4 refusal regression fails on the prior PR head and passes after this correction.pytest tests/unit_tests/utilsADDITIONAL INFORMATION
🤖 Generated with Claude Code