fix(admin): update password hashing method- Replace password function with password_hash for secure password storage- Use PASSWORD_DEFAULT algorithm for hashing

- Improve password security in admin controller

Signed-off-by: wolfcode <wolfcode@88.com>
This commit is contained in:
wolfcode
2025-06-28 10:15:07 +08:00
parent c82e1c8ea3
commit e4ae29fed2

View File

@@ -63,7 +63,7 @@ class Admin extends AdminController
$rule = [];
$this->validate($post, $rule);
if (empty($post['password'])) $post['password'] = '123456';
$post['password'] = password($post['password']);
$post['password'] = password_hash($post['password'],PASSWORD_DEFAULT);
try {
$save = self::$model::create($post);
}catch (\Exception $e) {