mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
Challenge-Response Authentication
This commit is contained in:
@@ -85,7 +85,9 @@ elseif($_SERVER["REQUEST_METHOD"] == "GET" && $take_recover && isset($_GET["id"]
|
||||
|
||||
$sec = mksecret();
|
||||
|
||||
$newpasshash = md5($sec . $newpassword . $sec);
|
||||
// $newpasshash = md5($sec . $newpassword . $sec);
|
||||
$newpasshash = hash('sha256', $newpassword);
|
||||
$newpasshash = hash('sha256', $sec.$newpasshash);
|
||||
|
||||
sql_query("UPDATE users SET secret=" . sqlesc($sec) . ", editsecret='', passhash=" . sqlesc($newpasshash) . " WHERE id=" . sqlesc($id)." AND editsecret=" . sqlesc($arr["editsecret"])) or sqlerr(__FILE__, __LINE__);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user