juicewcode opened a new pull request, #7065:
URL: https://github.com/apache/shenyu/pull/7065

   Fixes #6824
   ## Summary
   
     - Fix the inverted empty-value check in `ForwardedRemoteAddressResolver`.
     - Preserve valid single-value `X-Forwarded-For` client addresses.
     - Validate forwarded addresses as IPv4 or IPv6 literals before creating an 
`InetSocketAddress`.
     - Fall back to the TCP remote address for hostnames and other invalid 
values, preventing blocking DNS lookups on reactive
     threads.
   
   ## Test
   
     - Added coverage for a valid single IPv4 address.
     - Added coverage for a valid IPv6 address.
     - Added coverage for empty and missing `X-Forwarded-For` headers.
     - Added coverage for invalid hostname input falling back to the TCP remote 
address.
     - Added coverage for multiple header lines and trusted-index selection 
from a multi-value header.
   
   
   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   
   <!--
   Thank you for proposing a pull request. This template will guide you through 
the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`.
   


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