orangehedgehog3 opened a new pull request, #11562:
URL: https://github.com/apache/rocketmq/pull/11562
### Which Issue(s) This PR Fixes
- Fixes #11558
### Brief Description
`IPAddressUtils#isValidIPv4Cidr` and `#isValidIPv6Cidr` parsed the network
part of a
CIDR with `InetAddress.getByName`. That method resolves host names and
returns
127.0.0.1 for an empty string, so `/24` and `localhost/24` were accepted as
valid
CIDRs. Since `isValidIPOrCidr` is used by ACL source-IP validation, such
invalid
entries passed validation instead of being rejected.
The network part is now validated with `isValidIPv4` / `isValidIPv6`, so
only a
literal address of the matching family is accepted. Validation no longer
performs
name resolution.
### How Did You Test This Change?
- `mvn -pl common test` — 300 tests pass
- `mvn -pl auth test` — 93 tests pass
- Full reactor build on Windows 11 + JDK 8 (`mvn -B package
-Djacoco.skip=true`):
all 20 modules pass, ~3,500 unit tests with 0 failures, plus checkstyle,
license check and SpotBugs.
--
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]