lizhimins commented on PR #4523: URL: https://github.com/apache/rocketmq-dashboard/pull/4523#issuecomment-5761156513
Thanks — the defect is real and your diagnosis of it is correct. `NamesrvAddrParser.normalize` lowercased the whole bracketed IPv6 literal, so `[FE80::1%ProdNIC]:9876` was persisted as `%prodnic`. A named zone identifier is an interface name and is case-sensitive: the JDK's scoped-address resolution matches it against `NetworkInterface.getName()`, so folding its case can point at a different interface or at none. The precondition also holds — `commons-validator` 1.10.0, which `server/pom.xml` pins, explicitly strips the zone before validating (`isValidInet6Address` splits on `%` and checks the zone against `[^\s/%]+`), so a mixed-case zone passes validation and then reaches the lowercasing line. Extracting `normalizeIpv6Literal` was a tidy way to express it, your four new tests are mutation-sensitive, and leaving the DNS-hostname branch lowercased is correct since hostnames are case-insensitive. We are closing this as a duplicate of #4522, which fixes the same line the same way and has now been merged. #4522 was opened 22 minutes before this PR (11:50 UTC against 12:12 UTC on 2026-09-17), so this is a straightforward first-come call rather than a quality judgement — the two patches are semantically equivalent, differing only in that #4522 inlines the split while this one extracts a helper. #4522 also converted the two existing `NameserverRegistryServiceTest` cases to `@ParameterizedTest`, and its parser case asserts zone preservation, multi-separator normalization and DNS lowercasing in one pass. Only one implementation of the zone split can live in `NamesrvAddrParser`, so we are keeping the one that landed. Your issue #4520 and the registry-level tests you added were useful independent corroboration of the same bug — thank you for that. Please do take a look at #4522 as merged; if you spot anything it misses, a follow-up is welcome. -- 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]
