v1.2: 密码校验规则调整
This commit is contained in:
@@ -66,6 +66,8 @@ public class AccountController extends BaseController {
|
||||
|
||||
/** 密码强度检查正则,必须包括大小写字母和数字,长度为6到16 */
|
||||
private static final String PASSWORD_REGIX = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,16}$";
|
||||
/** 密码强度检查正则,必须包括大小写字母和数字,长度为6到16 */
|
||||
private static final String PASSWORD_REGIX_V2 = "^(?=.*\\d)(?=.*[a-zA-Z]).{6,16}$";
|
||||
|
||||
@Autowired
|
||||
private SysConfService sysConfService;
|
||||
@@ -117,7 +119,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
|
||||
// 弱密码检查
|
||||
if(!password.matches(PASSWORD_REGIX)){
|
||||
if(!password.matches(PASSWORD_REGIX_V2)){
|
||||
return new BusiResult(OAuthStatus.WEAK_PASSWORD.value(), OAuthStatus.WEAK_PASSWORD.getReasonPhrase(), null);
|
||||
}
|
||||
|
||||
@@ -160,7 +162,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
|
||||
// 弱密码检查
|
||||
if(!password.matches(PASSWORD_REGIX)){
|
||||
if(!password.matches(PASSWORD_REGIX_V2)){
|
||||
return new BusiResult(OAuthStatus.WEAK_PASSWORD.value(), OAuthStatus.WEAK_PASSWORD.getReasonPhrase(), null);
|
||||
}
|
||||
|
||||
@@ -285,7 +287,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
|
||||
// 密码长度检查
|
||||
if(!newPwd.matches(PASSWORD_REGIX)){
|
||||
if(!newPwd.matches(PASSWORD_REGIX_V2)){
|
||||
return new ServiceRes(OAuthStatus.WEAK_PASSWORD);
|
||||
}
|
||||
|
||||
@@ -330,7 +332,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
|
||||
// 密码长度检查
|
||||
if(!newPwd.matches(PASSWORD_REGIX)){
|
||||
if(!newPwd.matches(PASSWORD_REGIX_V2)){
|
||||
return new ServiceRes(OAuthStatus.WEAK_PASSWORD);
|
||||
}
|
||||
|
||||
@@ -364,7 +366,7 @@ public class AccountController extends BaseController {
|
||||
}
|
||||
|
||||
// 密码长度检查
|
||||
if(!newPwd.matches(PASSWORD_REGIX)){
|
||||
if(!newPwd.matches(PASSWORD_REGIX_V2)){
|
||||
return new ServiceRes(OAuthStatus.WEAK_PASSWORD);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user