liuhairui 2 tuần trước cách đây
mục cha
commit
5cf943c507

+ 1 - 1
application/admin/controller/Index.php

@@ -79,7 +79,7 @@ class Index extends Backend
             $token = $this->request->post('__token__');
             $rule = [
                 'username'  => 'require|length:3,30',
-                'password'  => 'require|length:3,30',
+                'password'  => 'require|length:4,30',
                 '__token__' => 'require|token',
             ];
             $data = [

+ 1 - 1
application/admin/view/index/login.html

@@ -215,7 +215,7 @@
                         <div class="input-group-addon">
                             <span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
                         </div>
-                        <input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
+                        <input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;length(4~30)"/>
                     </div>
 
                     {if $Think.config.fastadmin.login_captcha}

+ 2 - 2
application/index/controller/Index.php

@@ -1427,8 +1427,8 @@ class Index extends Frontend
         if ($oldPwd === '' || $newPwd === '' || $renewPwd === '') {
             $this->error('请填写完整');
         }
-        if (strlen($newPwd) < 6) {
-            $this->error('新密码至少6位');
+        if (strlen($newPwd) < 4) {
+            $this->error('新密码至少4位');
         }
         if ($newPwd !== $renewPwd) {
             $this->error('两次输入的新密码不一致');

+ 2 - 2
application/index/view/index/index.html

@@ -924,8 +924,8 @@
                     alert('请填写完整');
                     return;
                 }
-                if (newP.length < 6) {
-                    alert('新密码至少6位');
+                if (newP.length < 4) {
+                    alert('新密码至少4位');
                     return;
                 }
                 if (newP !== renP) {