|
@@ -147,7 +147,13 @@ public class LoginService {
|
|
|
|| StringUtils.isEmpty(param.getConfirmPwd())){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
|
|
|
}
|
|
|
- if(!param.getPassword().matches(ConstantRegex.PASSWORD_REGEX)){
|
|
|
+ String password ;
|
|
|
+ if(StringUtils.isNotBlank(param.getClear()) && param.getClear().equals("YES")){
|
|
|
+ password = param.getPassword();
|
|
|
+ }else {
|
|
|
+ password = Base64Converter.decode(Base64Converter.subText(param.getPassword()));
|
|
|
+ }
|
|
|
+ if(!password.matches(ConstantFilePath.PASSWORD_REGEX)){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3011, LoginConstant.FAILURE_MSG_3011);
|
|
|
}
|
|
|
if (!param.getConfirmPwd().equals(param.getPassword())){
|
|
@@ -158,6 +164,7 @@ public class LoginService {
|
|
|
if(user != null){
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3008, LoginConstant.FAILURE_MSG_3008);
|
|
|
}
|
|
|
+ param.setPassword(password);
|
|
|
userService.register(param);
|
|
|
|
|
|
}
|