Skip to content

fix(rmqctl): allow plain HTTP for intranet DNS names that resolve to private addresses - #4946

Closed
Frun1na wants to merge 1 commit into
apache:rocketmq-studiofrom
Frun1na:fix/rmqctl-private-hostname-http
Closed

Frun1na wants to merge 1 commit into
apache:rocketmq-studiofrom
Frun1na:fix/rmqctl-private-hostname-http

Conversation

@Frun1na

@Frun1na Frun1na commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Brief Description

isPrivateHost only recognized literal IPs, so the "plain HTTP allowed for private-network Studio endpoints" support (#4855) did not cover the common case of an intranet DNS name (http://studio.internal:8080): net.ParseIP fails for hostnames and the URL was rejected. The host is now resolved and accepted only when every resolved address is loopback/RFC1918/link-local; unresolvable names and mixed public/private resolution stay on HTTPS. Resolution is stubbable for tests and bounded by a 2s timeout.

Note: this intentionally widens the HTTP allowance relative to #4855 - flagging it in the PR for explicit maintainer review of the security posture.

How Did You Test This Change?

go test ./internal/studio/ -count=1   # ok (new deterministic resolution stubs)
go vet, gofmt clean; go test ./... green

Copilot AI lite review requested due to automatic review settings September 22, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants