yyqdbngt opened a new pull request, #3812: URL: https://github.com/apache/rocketmq-dashboard/pull/3812
### Motivation The existing `UrlHostGuardMulticastTest` only rejects multicast addresses. The SSRF guard's other address classes — link-local/metadata, any-local, private site-local and the loopback policy — were untested in this file. ### Changes - `isAllowedHostShouldRejectLinkLocalAndAnyLocalAddresses`: the cloud metadata range `169.254.169.254` and `0.0.0.0` are rejected. - `isAllowedHostShouldAllowPrivateSiteLocalRanges`: `10.x`, `192.168.x` and `172.16-31.x` remain allowed for on-premise endpoints. - `isAllowedHostShouldAdmitLoopbackOnlyWhenConfigured`: `127.0.0.1` and `::1` are admitted only when `allowLoopback` is set. ### Verification ``` mvn -B test -Dtest=UrlHostGuardMulticastTest [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 [INFO] BUILD SUCCESS ``` -- 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]
