refactor(auth): upgrade password hashing to PHP's password_hash
- Replace custom password hashing function with PHP's built-in password_hash - Update password verification to use password_verify - Adjust database schema to accommodate new password hash length - Modify installation and login controllers to use new hashing method
This commit is contained in:
@@ -109,7 +109,7 @@ class Index extends AdminController
|
||||
|
||||
try {
|
||||
$save = $row->save([
|
||||
'password' => password($post['password']),
|
||||
'password' => password_hash($post['password'], PASSWORD_DEFAULT),
|
||||
]);
|
||||
}catch (Exception $e) {
|
||||
$this->error('保存失败');
|
||||
|
||||
Reference in New Issue
Block a user