第44批:玩家端账号安全双层验证(改密/2FA绑定解绑/恢复代码)+admin用户搜索卡住根因修复+sync改密列名修复

This commit is contained in:
ypsdf1
2026-10-22 18:55:26 +08:00
parent d4748c4e62
commit 71b644182c
5 changed files with 1281 additions and 41 deletions
+2 -2
View File
@@ -4845,7 +4845,7 @@ function changePassword() {
}
$db = getDB();
$stmt = $db->prepare("SELECT password_hash, password_salt FROM weblogin_credentials WHERE player_name = :player");
$stmt = $db->prepare("SELECT password_hash, salt, temp_password_hash, temp_pw_expire FROM weblogin_credentials WHERE player_name = :player");
$stmt->bindValue(':player', $player, SQLITE3_TEXT);
$result = $stmt->execute();
$row = $result->fetchArray(SQLITE3_ASSOC);
@@ -4855,7 +4855,7 @@ function changePassword() {
}
// 验证旧密码
$saltBytes = base64_decode($row['password_salt'], true);
$saltBytes = base64_decode($row['salt'], true);
if ($saltBytes === false || $saltBytes === '') {
error('密码盐值无效');
}