Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix IPv6 allowed outbound host parsing#3579

Merged
rylev merged 1 commit into
spinframework:main from
ChihweiLHBird:zhiwei/ipv6-as-domain
Jun 23, 2026
Merged

Fix IPv6 allowed outbound host parsing #3579
rylev merged 1 commit into
spinframework:main from
ChihweiLHBird:zhiwei/ipv6-as-domain

Conversation

@ChihweiLHBird

@ChihweiLHBird ChihweiLHBird commented Jun 17, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Fix parsing of allowed_outbound_hosts entries containing IPv6 literals or IPv6 CIDR ranges without an explicit port.

Previously, rsplit_once(':') could mistake an IPv6 address segment for a port. These entries now use the scheme’s default port:

  • http://[::1]
  • https://[::1]
  • http://ff00::/8

The updated parsing also:

  • Validates and normalizes wildcard domain suffixes.
  • Rejects malformed paths and multiple trailing slashes while allowing one empty trailing slash.
  • Keeps RFC 3986-compatible empty ports, such as http://example.com:/, accepted.

Added regression coverage for IPv6 parsing and matching, malformed authorities, wildcard domains, paths, and error messages.

@ChihweiLHBird ChihweiLHBird force-pushed the zhiwei/ipv6-as-domain branch 4 times, most recently from e99758f to 7eaccde Compare June 17, 2026 05:58
@itowlson itowlson requested a review from lann June 17, 2026 19:59
Comment thread crates/outbound-networking-config/src/allowed_hosts.rs Outdated
Comment thread crates/outbound-networking-config/src/allowed_hosts.rs Outdated
@ChihweiLHBird ChihweiLHBird force-pushed the zhiwei/ipv6-as-domain branch 2 times, most recently from bb57b3d to ca9aebf Compare June 21, 2026 00:58
Comment thread crates/outbound-networking-config/src/allowed_hosts.rs Outdated
... and CIDR without explicit ports
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
@rylev rylev merged commit 3198d99 into spinframework:main Jun 23, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rylev rylev rylev approved these changes

@lann lann Awaiting requested review from lann

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /