fixed password length 6-digit limit

This commit is contained in:
jianghang.loujh
2023-09-02 11:12:09 +08:00
parent 2786e06ccf
commit a216b55010
3 changed files with 6 additions and 6 deletions

View File

@@ -66,8 +66,8 @@ export default {
}
}
const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
callback(new Error('The password can not be less than 6 digits'))
if (value.length < 5) {
callback(new Error('The password can not be less than 5 digits'))
} else {
callback()
}

View File

@@ -38,12 +38,12 @@ public class SimpleAdminConnectors {
}
private static String getDesensitizationPassword(String password) {
String defaultPassword = "******";
String defaultPassword = "*****";
if (Strings.isNullOrEmpty(password) || password.length() < 6) {
if (Strings.isNullOrEmpty(password) || password.length() < 5) {
return defaultPassword;
} else {
return String.format("%s******", password.substring(0, 3));
return String.format("%s*****", password.substring(0, 3));
}
}
}

View File

@@ -21,7 +21,7 @@ public class UserServiceImpl implements UserService {
private static byte[] seeds = "canal is best!".getBytes();
private static final Integer PASSWORD_LENGTH = 6;
private static final Integer PASSWORD_LENGTH = 5;
public User find4Login(String username, String password) {
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {