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

   ### Motivation
   
   The existing `PasswordHasherTest` proves salt uniqueness, verification and 
the salt/digest length guards, but the remaining `matches` guards — null 
arguments, structurally malformed hashes and out-of-range iteration counts — 
were untested.
   
   ### Changes
   
   - `matchesShouldRejectNullArguments`: a null password or stored hash never 
verifies.
   - `matchesShouldRejectMalformedHashFormat`: non-hash strings, wrong scheme 
prefixes and non-numeric iteration counts are rejected before any key 
derivation.
   - `matchesShouldRejectIterationsOutsideAllowedBounds`: iteration counts 
below 100k or above 1M (with otherwise valid salt/digest segments) are rejected.
   
   ### Verification
   
   ```
   mvn -B test -Dtest=PasswordHasherTest
   [INFO] Tests run: 5, 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to