mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
change backend create user + reset password hashing
This commit is contained in:
@@ -124,7 +124,7 @@ class UserRepository extends BaseRepository
|
||||
}
|
||||
$setting = Setting::get('main');
|
||||
$secret = mksecret();
|
||||
$passhash = md5($secret . $password . $secret);
|
||||
$passhash = hash('sha256', $secret . hash('sha256', $password));
|
||||
$data = [
|
||||
'username' => $username,
|
||||
'email' => $email,
|
||||
@@ -161,7 +161,7 @@ class UserRepository extends BaseRepository
|
||||
$this->checkPermission($operator, $user);
|
||||
}
|
||||
$secret = mksecret();
|
||||
$passhash = md5($secret . $password . $secret);
|
||||
$passhash = hash('sha256', $secret . hash('sha256', $password));
|
||||
$update = [
|
||||
'secret' => $secret,
|
||||
'passhash' => $passhash,
|
||||
|
||||
Reference in New Issue
Block a user