fix: Remove wrapping [] from input IP addresses #34

Merged
Aranjedeath merged 1 commit from zoe/fix-invalid-ipv6-parsing into main 2026-07-26 03:16:57 +00:00
Member

This was causing IPv6 hosts to fail to parse properly, and therefore
giving results like Named("[2a0b", "<redacted>]") instead of
Literal("[2a0b:<redacted>]:8448")

Root cause: IpAddr::from_str expects an IP address without the brackets.
Simple fix is to add a test case with brackets, and a few lines of code
to remove the brackets if they exist.

See-Also:

This was causing IPv6 hosts to fail to parse properly, and therefore giving results like `Named("[2a0b", "<redacted>]")` instead of `Literal("[2a0b:<redacted>]:8448")` Root cause: `IpAddr::from_str` expects an IP address without the brackets. Simple fix is to add a test case with brackets, and a few lines of code to remove the brackets if they exist. See-Also: - [Start of conversation](https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24ycrGAve619dUbXgiQO-OFTvXMXNy28ltyCSSek_5NpY?via=wolfgirl.pet&via=explodie.org&via=matrix.org) - [End of conversation](https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24zKpTlRDwvymvwUcGhgqO4Agcj0eqEgDf6WFc6Q6i9D4?via=wolfgirl.pet&via=explodie.org&via=matrix.org)
fix: Remove wrapping [] from input IP addresses
Some checks failed
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m56s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 2m50s
ffb5b6852b
This was causing IPv6 hosts to fail to parse properly, and therefore
giving results like `Named("[2a0b", "<redacted>]")` instead of
`Literal("[2a0b:<redacted>]:8448")`

Root cause: `IpAddr::from_str` expects an IP address without the brackets.
Simple fix is to add a test case with brackets, and a few lines of code
to remove the brackets if they exist.

See-Also:
 - [Start of conversation](https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24ycrGAve619dUbXgiQO-OFTvXMXNy28ltyCSSek_5NpY?via=wolfgirl.pet&via=explodie.org&via=matrix.org)
 - [End of conversation](https://matrix.to/#/!ksTlboXVgcyWjv5GrlEeKyQuJ8ZCprnwQx2b6-BQ44Q/%24zKpTlRDwvymvwUcGhgqO4Agcj0eqEgDf6WFc6Q6i9D4?via=wolfgirl.pet&via=explodie.org&via=matrix.org)
s1lv3r scheduled this pull request to auto merge when all checks succeed 2026-07-25 21:03:38 +00:00
s1lv3r force-pushed zoe/fix-invalid-ipv6-parsing from ffb5b6852b
Some checks failed
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m56s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 2m50s
to 1883740c13
All checks were successful
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m9s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 4m47s
Checks / Prek / Pre-commit & Formatting (push) Successful in 41s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 1m54s
2026-07-26 02:02:39 +00:00
Compare
s1lv3r scheduled this pull request to auto merge when all checks succeed 2026-07-26 02:19:02 +00:00
Aranjedeath deleted branch zoe/fix-invalid-ipv6-parsing 2026-07-26 03:16:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/resolvematrix!34
No description provided.