vdegans opened a new pull request, #2724:
URL: https://github.com/apache/apisix-ingress-controller/pull/2724

   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   - [x] Bugfix
   - [x] Refactor
   - [x] Chore
   
   ### What this PR does / why we need it:
   
   Fixes: #2723
   
   Currently, annotations that accept comma-separated lists (such as 
whitelist-source-range and blacklist-source-range) are not trimmed, so any 
spaces after commas are preserved. This results in IP entries starting with a 
space, which breaks the whitelist and blacklist functionality.
   
   This PR trims whitespace from each annotation item before processing, 
ensuring that spaces after commas do not cause parsing errors.
   
   Behavior Before / After:
   
   Aspect: Annotation parsing
   Before: "1.2.3.4, 5.6.7.8" -> ["1.2.3.4", " 5.6.7.8"]
   After:  "1.2.3.4, 5.6.7.8" -> ["1.2.3.4", "5.6.7.8"]
   
   Aspect: Whitelist/Blacklist enforcement
   Before: Fails for entries with leading spaces
   After:  Works correctly for all entries
   
   ### Related issues, if any:
   
   - #2723
   
   ### Pre-submission checklist:
   
   - [x] Did you explain what problem this PR solves? Or what new features have 
been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [ ] Is this PR backward compatible? If it is not backward compatible, 
please discuss on the mailing list first


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