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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user