From 2564d2d60beca3fe0e92a58094b5351fc45be38c Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 20 Jun 2022 09:27:56 +0000 Subject: [PATCH 01/10] * Finish task#57903 --- module/doc/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 9f6a58abb5..a228f4f577 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -871,9 +871,10 @@ class doc extends control if($doclib->acl == 'custom') { - return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control")); + return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); } - if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control")); + + if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); if($doclib->acl == 'private') echo 'private'; if($doclib->acl == 'default') echo 'default'; return false; From dff6937dc479ef921418feccc7f9238aa2b011f5 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 20 Jun 2022 09:29:29 +0000 Subject: [PATCH 02/10] * Adjust code --- module/doc/control.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/doc/control.php b/module/doc/control.php index a228f4f577..46b0872f57 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -873,7 +873,6 @@ class doc extends control { return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); } - if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'")); if($doclib->acl == 'private') echo 'private'; if($doclib->acl == 'default') echo 'default'; From b761aa029bcb07d6f4f35b3ab9670aa7bbe431f7 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 21 Jun 2022 02:50:55 +0000 Subject: [PATCH 03/10] * Finish task #57907 --- module/install/model.php | 10 ++++++++++ module/install/view/step5.html.php | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/module/install/model.php b/module/install/model.php index 794df3de6d..8d4b8d65c3 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -516,6 +516,16 @@ class installModel extends model } } + /* Check password. */ + if(!validater::checkReg($this->post->password, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule; + if(isset($this->config->safe->mode) and (strlen($this->post->password) < $this->config->safe->mode)) dao::$errors['password'][] = $this->lang->user->weakPassword; + if(!empty($this->config->safe->changeWeak)) + { + if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin'); + if(strpos(",{$this->config->safe->weak},", ",{$this->post->password},") !== false) dao::$errors['password'][] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak); + } + if(dao::isError()) return false; + /* Insert a company. */ $company = new stdclass(); $company->name = $data->company; diff --git a/module/install/view/step5.html.php b/module/install/view/step5.html.php index 91ab940ac3..71af2e7ba8 100644 --- a/module/install/view/step5.html.php +++ b/module/install/view/step5.html.php @@ -46,7 +46,7 @@