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');
|
$setting = Setting::get('main');
|
||||||
$secret = mksecret();
|
$secret = mksecret();
|
||||||
$passhash = md5($secret . $password . $secret);
|
$passhash = hash('sha256', $secret . hash('sha256', $password));
|
||||||
$data = [
|
$data = [
|
||||||
'username' => $username,
|
'username' => $username,
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
@@ -161,7 +161,7 @@ class UserRepository extends BaseRepository
|
|||||||
$this->checkPermission($operator, $user);
|
$this->checkPermission($operator, $user);
|
||||||
}
|
}
|
||||||
$secret = mksecret();
|
$secret = mksecret();
|
||||||
$passhash = md5($secret . $password . $secret);
|
$passhash = hash('sha256', $secret . hash('sha256', $password));
|
||||||
$update = [
|
$update = [
|
||||||
'secret' => $secret,
|
'secret' => $secret,
|
||||||
'passhash' => $passhash,
|
'passhash' => $passhash,
|
||||||
|
|||||||
Reference in New Issue
Block a user