Skip to content

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/1.8.x#1069

Open
hc-github-team-consul-core wants to merge 1 commit intorelease/1.8.xfrom
backport/spulluri/fixing_bugs_dp/reasonably-safe-collie
Open

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/1.8.x#1069
hc-github-team-consul-core wants to merge 1 commit intorelease/1.8.xfrom
backport/spulluri/fixing_bugs_dp/reasonably-safe-collie

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #1066 to be assessed for backporting due to the inclusion of the label backport/1.8.

The below text is copied from the body of the original PR.


Description

Follow-up to #1064.

This updates the remaining Envoy admin URLs in pkg/envoy/proxy.go to use net.JoinHostPort instead of manually formatting host:port pairs.

The previous fmt.Sprintf("http://%s:%v/...") pattern is not safe for all admin bind addresses, especially IPv6 addresses. Drain() and Quit() were already updated to use net.JoinHostPort; this change applies the same fix to:

  • DumpConfig() via /config_dump?include_eds
  • Ready() via /ready

This keeps Envoy admin endpoint construction consistent across the proxy manager and avoids malformed URLs when the admin address is not a simple IPv4/hostname value.

Testing

  • Ran pkg/envoy/proxy_test.go

Overview of commits

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved Consul Bot automated PR

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.

3 participants