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

   ## Summary
   
   Extends the existing `UrlHostGuardTest` (5 to 8 tests) to cover the 
`check(...)` URL validation gate, which previously had no direct tests (only 
the address predicates were covered).
   
   Added cases:
   - http/https URLs are accepted while other schemes are rejected with the 
scheme message;
   - blank, null, and host-less (`http://`) inputs are rejected with their 
messages;
   - loopback and cloud-metadata addresses are rejected (loopback only when not 
explicitly allowed, metadata always), and trailing slashes are tolerated on 
allowed URLs.
   
   ## Why
   
   `check` is the SSRF gate on every caller-supplied URL (data-source and LLM 
gateway config); its scheme/host/address branches were untested.
   
   ## Testing
   
   `mvn -B test -Dtest=UrlHostGuardTest` — 8/8 pass; checkstyle (validate) 
clean.


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