From e4ae29fed2da007d324a5dba51da0ca48f892e1b Mon Sep 17 00:00:00 2001 From: wolfcode Date: Sat, 28 Jun 2025 10:15:07 +0800 Subject: [PATCH] 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 --- app/admin/controller/system/Admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/system/Admin.php b/app/admin/controller/system/Admin.php index 9db4444..8816346 100644 --- a/app/admin/controller/system/Admin.php +++ b/app/admin/controller/system/Admin.php @@ -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) {