root 5 years ago
parent
commit
88d7e2d35e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Console/Commands/V2boardInstall.php

+ 3 - 0
app/Console/Commands/V2boardInstall.php

@@ -83,6 +83,9 @@ class V2boardInstall extends Command
     {
         $user = new User();
         $user->email = $email;
+        if (strlen($password) < 8) {
+            abort(500, '管理员密码长度最小为8位字符');
+        }
         $user->password = password_hash($password, PASSWORD_DEFAULT);
         $user->v2ray_uuid = Helper::guid(true);
         $user->token = Helper::guid();