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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user