zmuxuny opened a new issue, #7131:
URL: https://github.com/apache/rocketmq-dashboard/issues/7131

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository 
and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a 
defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated 
the exact version I am running below.
   
   
   ### Studio Version
   
   rocketmq-studio at 127c47b06a268cc74224d5f34c56ec7c36ac0d55
   
   ### Runtime Environment
   
   rmqctl, Go 1.27.1. Reproduced using the real Target validation and a 
recording HTTP RoundTripper; no IPv6 interface or live server is required for 
the regression.
   
   ### Connected RocketMQ Cluster
   
   Not applicable: failure occurs locally before any HTTP request reaches 
Studio or a broker.
   
   ### Build Toolchain
   
   _No response_
   
   ### Describe the Bug
   
   rmqctl already permits plain HTTP for loopback/private/link-local literal 
addresses, but a correctly escaped scoped IPv6 endpoint such as 
http://[fe80::1%25eth0]:6789 is rejected as requiring HTTPS. url.Parse 
correctly produces hostname fe80::1%eth0, while net.ParseIP in isPrivateHost 
rejects the zone suffix. Link-local IPv6 normally needs that scope to identify 
its interface.
   
   ### Steps to Reproduce
   
   Configure an rmqctl context with a scoped link-local Studio URL such as 
http://[fe80::1%25eth0]:6789, ordinary credential environment references, and 
an explicit Studio instance. Invoke a read-only command. Validation fails 
before dispatch. Reproduced by Target.validate tests for named/numeric 
link-local zones and a private IPv6 zone, plus Client.request with a recording 
transport. All four fail on unchanged production.
   
   ### What Did You Expect to See?
   
   Classify the actual IPv6 address while preserving its interface zone in the 
outgoing URL. Keep public HTTP endpoints rejected, including public IPv6 
addresses with a zone, and keep malformed addresses rejected.
   
   ### What Did You See Instead?
   
   studio server must use HTTPS (HTTP is allowed only for loopback or 
private-network addresses), even for fe80::1 with a valid zone. The configured 
HTTP transport is never reached.
   
   ### Additional Context
   
   All-state PR and issue searches for rmqctl IPv6, scoped/zone and link-local 
zone found no matching fix. Proposed bounded change: use Go net/netip 
scoped-address parsing for the existing host classification; do not remove the 
zone from the request URL, resolve DNS, follow redirects, or relax the 
public-host HTTPS policy. Tests retain public IPv6 and malformed-zone rejection 
controls. AI assistance used for investigation and regression tests; no live 
network or user credentials involved.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to