mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 22:21:09 +08:00
Require 6 char min for low strength passwords and add validator tests
This commit is contained in:
@@ -24,7 +24,14 @@ public class PasswordValidator {
|
||||
checkHigh(password);
|
||||
break;
|
||||
default:
|
||||
// LOW, nothing beyond non-empty
|
||||
checkLow(password);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkLow(String password) {
|
||||
if (password.length() < 6) {
|
||||
throw new IllegalArgumentException("Password must be at least 6 characters long");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user