Skip to content

Commit a216b55

Browse files
committed
fixed password length 6-digit limit
1 parent 2786e06 commit a216b55

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

admin/admin-ui/src/views/login/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export default {
6666
}
6767
}
6868
const validatePassword = (rule, value, callback) => {
69-
if (value.length < 6) {
70-
callback(new Error('The password can not be less than 6 digits'))
69+
if (value.length < 5) {
70+
callback(new Error('The password can not be less than 5 digits'))
7171
} else {
7272
callback()
7373
}

admin/admin-web/src/main/java/com/alibaba/otter/canal/admin/connector/SimpleAdminConnectors.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public static <R> R execute(String ip, int port, String user, String passwd, Fun
3838
}
3939

4040
private static String getDesensitizationPassword(String password) {
41-
String defaultPassword = "******";
41+
String defaultPassword = "*****";
4242

43-
if (Strings.isNullOrEmpty(password) || password.length() < 6) {
43+
if (Strings.isNullOrEmpty(password) || password.length() < 5) {
4444
return defaultPassword;
4545
} else {
46-
return String.format("%s******", password.substring(0, 3));
46+
return String.format("%s*****", password.substring(0, 3));
4747
}
4848
}
4949
}

admin/admin-web/src/main/java/com/alibaba/otter/canal/admin/service/impl/UserServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class UserServiceImpl implements UserService {
2121

2222
private static byte[] seeds = "canal is best!".getBytes();
2323

24-
private static final Integer PASSWORD_LENGTH = 6;
24+
private static final Integer PASSWORD_LENGTH = 5;
2525

2626
public User find4Login(String username, String password) {
2727
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {

0 commit comments

Comments
 (0)