yyqdbngt opened a new pull request, #2869:
URL: https://github.com/apache/rocketmq-dashboard/pull/2869

   ## Summary
   - `NamesrvAddrParser.isValidIpv6Literal` now performs a full address-literal 
parse
     (`InetAddress.getByName`, after the existing character-set pre-filter that 
prevents
     any DNS lookup) in addition to the character/colon checks.
   - Added regression tests: literals with too few groups (`[1:2:3]`, 
`[ffff:0]`) are
     rejected, and full-form literals are accepted and lowercased.
   
   ## Why
   The old check only validated the character set and required at least two 
colons, so
   `[1:2:3]` — three groups, not a valid IPv6 address — was accepted into the 
registry
   and only failed much later when the probe connected through the RocketMQ 
client. The
   pre-filtered character set guarantees `getByName` treats the value as a 
literal (no
   hostname, no DNS), so the parse adds full structural validation without the
   unbounded-resolution risk the parser was designed to avoid.
   
   ## Testing
   - `cd server && mvn -Dtest=NamesrvAddrParserTest test` — Tests run: 17, 
Failures: 0, Errors: 0
   - `cd server && mvn 
-Dtest=NameserverRegistryServiceTest,NameServerControllerTest test`
     — Tests run: 36, Failures: 0, Errors: 0
   


-- 
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