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

   ## Summary
   
   Extends the existing `PasswordHasherTest` (2 to 6 tests) to pin down the 
stored-hash validation contract.
   
   Added cases:
   - malformed formats are mismatches, never crashes: plain text, a foreign 
algorithm prefix, a truncated field count, a non-numeric iteration count, and 
an undecodable/oversized salt-digest pair (all rejected before any PBKDF2 
derivation);
   - iteration counts outside the safe range (below 100k / above 1M) are 
rejected;
   - null password and null stored hash are both mismatches;
   - a single flipped character in either the stored salt or the digest turns a 
valid hash into a mismatch.
   
   ## Why
   
   `matches` is the gate for every login; the validation branches (algorithm, 
field count, iteration bounds, encoded lengths) had no direct coverage beyond 
oversized fields.
   
   ## Testing
   
   `mvn -B test -Dtest=PasswordHasherTest` — 6/6 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