You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/05 20:55:37 UTC
[PR] [ISSUE-3780][test] Deepen UrlHostGuardTest with check guards, trailing slash trim and loopback policy [rocketmq-dashboard]
yyqdbngt opened a new pull request, #3780:
URL: https://github.com/apache/rocketmq-dashboard/pull/3780
### Motivation
The existing `UrlHostGuardTest` pins the address-classification core of the SSRF guard, but the public `check(String, boolean)` envelope guards and the loopback policy of `isAllowedHost` were untested.
### Changes
- `checkShouldRejectNullOrBlankUrl`: a missing or blank URL fails fast with `URL is required`.
- `checkShouldRejectNonHttpScheme`: non-http(s) schemes are rejected before any resolution.
- `checkShouldRejectHostlessUrl`: URLs without a host are rejected with the dedicated message.
- `checkShouldAcceptPublicUrlAndTrimTrailingSlashes`: surrounding whitespace and trailing slashes are stripped before validation, and a public IP target passes.
- `isAllowedHostShouldRejectLoopbackUnlessExplicitlyAllowed`: loopback literals and `localhost` are denied unless `allowLoopback` is set.
### Verification
```
mvn -B test -Dtest=UrlHostGuardTest
[INFO] Tests run: 10, 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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE-3780][test] Deepen UrlHostGuardTest with check guards, trailing slash trim and loopback policy [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3780: [ISSUE-3780][test] Deepen UrlHostGuardTest with check guards, trailing slash trim and loopback policy
URL: https://github.com/apache/rocketmq-dashboard/pull/3780
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org