Skip to content

Normalize addresses before the deny range check - #224

Merged
Mzack9999 merged 1 commit into
mainfrom
ip-canonical-deny
Nov 3, 2026
Merged

Mzack9999 merged 1 commit into
mainfrom
ip-canonical-deny

Conversation

@Mzack9999

Copy link
Copy Markdown
Member

Closes #223

Proposed changes

  • Unmap IPv4-mapped IPv6 addresses and parse short IPv4 forms (127.1, 2130706433) before the range lookup, in host, URL and host:port inputs.
  • Treat localhost as loopback.
  • Add ::/128 and ::/96 to the default IPv6 deny list.

Proof

New table tests for each address form (TestValidateAddressForms, TestValidateExcludedIPv4Forms, TestValidateAllowListMappedForms, TestValidateHostBracketedIP). Existing tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deny ranges do not match some IPv6 and short IPv4 address forms

1 participant