wangjiang988 2 лет назад
Родитель
Сommit
b147c10f0d
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      src/main/java/platform/modules/home/web/HomeRefactorController.java

+ 10 - 0
src/main/java/platform/modules/home/web/HomeRefactorController.java

@@ -439,6 +439,16 @@ public class HomeRefactorController extends BaseController {
             if (!verificationCodeUtil.validateVerificationCode(information.getPhone(), information.getValidateNum())) {
                 return ResponseMessage.error("验证码错误!");
             }
+
+            String pwd = information.getPassword().trim();
+            Preconditions.checkNotNull(pwd);
+            if (!PwdCheckUtil.checkPasswordLength(pwd, "8", null)
+                    || !PwdCheckUtil.checkContainCase(pwd)
+                    || !PwdCheckUtil.checkContainDigit(pwd)
+                    || !PwdCheckUtil.checkContainSpecialChar(pwd)
+            ) {
+                return ResponseMessage.error("密码必须包含数字、字母、特殊符号且大于8位");
+            }
 //            }
             information.setConfirm_password(null);
             Street street = new Street();