fix password related

This commit is contained in:
xiaomlove
2025-10-30 10:28:52 +07:00
parent f1cbb5c3da
commit 3d5e316275
7 changed files with 79 additions and 60 deletions

View File

@@ -790,8 +790,10 @@ tr_small($lang_usercp['row_funbox'],"<input type=checkbox name=showfb".($CURUSER
$passhash = hash('sha256', $sec . $chpassword);
$updateset[] = "secret = " . sqlesc($sec);
$updateset[] = "passhash = " . sqlesc($passhash);
$authKey = mksecret();
$updateset[] = "auth_key = " . sqlesc($authKey);
logincookie($CURUSER["id"], $userInfo->auth_key);
logincookie($CURUSER["id"], $authKey);
$passupdated = 1;
}