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

   ### Brief Description
   
   Reject zero-only ranges such as `192.168.1.0-0` and `2001:db8::0-0:*` before 
saving plain ACL accounts. RocketMQ's legacy address parser only initializes a 
range when its upper bound is positive: zero-only ranges can fail during 
matching or silently widen a trailing wildcard.
   
   Keep literal zero addresses and prefixes, ranges starting at zero with a 
positive upper bound, and positive equal bounds accepted. The existing 
validation path returns 400 before persistence or auditing. Existing stored 
expressions are not migrated; affected accounts must use a literal zero instead 
of a zero-only range when saved again.
   
   ### How Did You Test This Change?
   
   Using JDK 22 with the project's Java 21 compilation target:
   
   - Before the production change, `cd server && mvn -B -ntp 
-Dtest=PlainAclRemoteAddressValidatorTest,AclServiceTest test`: 151 tests, 16 
expected regression failures, 0 errors. The new valid controls passed.
   - After the fix, `cd server && mvn -B -ntp 
'-Dtest=org.apache.rocketmq.studio.instance.acl.*Test' test`: 226 tests passed, 
0 failures, 0 errors, 0 skipped. Compilation and Checkstyle passed in the same 
run.
   - `git diff --check` passed.
   - A standalone Java probe against actual RocketMQ ACL 4.9.8 and 5.3.0 jars 
reproduced matching exceptions for a terminal `0-0` range and confirmed that 
`2001:db8::0-0:*` incorrectly matches `2001:db8::1:7` and `2001:db8::ffff:7`.
   
   No live Broker integration or full backend suite was run.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`fix:`)
   - [x] Tests added for invalid ranges and supported neighboring forms
   - [x] No UI text changes requiring translations
   - [x] No new source files or dependencies
   - [x] The validator comment explains the Broker parser compatibility 
constraint
   


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