mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed password length 6-digit limit
This commit is contained in:
@@ -66,8 +66,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const validatePassword = (rule, value, callback) => {
|
const validatePassword = (rule, value, callback) => {
|
||||||
if (value.length < 6) {
|
if (value.length < 5) {
|
||||||
callback(new Error('The password can not be less than 6 digits'))
|
callback(new Error('The password can not be less than 5 digits'))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ public class SimpleAdminConnectors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String getDesensitizationPassword(String password) {
|
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;
|
return defaultPassword;
|
||||||
} else {
|
} else {
|
||||||
return String.format("%s******", password.substring(0, 3));
|
return String.format("%s*****", password.substring(0, 3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class UserServiceImpl implements UserService {
|
|||||||
|
|
||||||
private static byte[] seeds = "canal is best!".getBytes();
|
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) {
|
public User find4Login(String username, String password) {
|
||||||
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
|
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user