Skip to content

Parse RPC listen host safely#458

Open
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-rpc-listen-host-parsing
Open

Parse RPC listen host safely#458
giwaov wants to merge 1 commit into
canopy-network:mainfrom
giwaov:issue-rpc-listen-host-parsing

Conversation

@giwaov

@giwaov giwaov commented Jul 4, 2026

Copy link
Copy Markdown

Summary

  • Parse the configured listen host with net.SplitHostPort before starting RPC servers.
  • Reuse the parsed host for wallet and explorer static server logging.
  • Add coverage for IPv4, wildcard, IPv6, and host-only listen addresses.

Why

The previous strings.Split call split on every colon. IPv6 listen addresses such as [::]:9001 were reduced to an invalid host fragment instead of the configured host.

Testing

  • git diff --check
  • Not run: Go toolchain is not installed in this environment.

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.

1 participant