Use new token location

This commit is contained in:
2026-01-29 21:06:21 -07:00
parent e6c045e1e1
commit 9b06f966f1
17 changed files with 75 additions and 90 deletions

View File

@@ -18,8 +18,8 @@ if (!preg_match('/^[ a-zA-Z0-9!@#\$%\^&\*\(\)_\+\-=\[\]\{\};\':",\.<>\/\?\\\\|`~
$conn0 = newConnection(0);
$conn1 = newConnection(1);
$stmt = $conn0->prepare("SELECT * FROM users WHERE username = ?");
$stmt->bind_param("s", $username);
$stmt = $conn0->prepare("SELECT * FROM users WHERE username = ? AND token = ?");
$stmt->bind_param("ss", $username, $token);
$stmt->execute();
$result = $stmt->get_result();
$stmt->close();
@@ -28,8 +28,8 @@ if (!$row) exitWithMessage(json_encode(["success" => false, "message" => "Invali
$id = $row["id"];
$stmt = $conn1->prepare("SELECT * FROM userdata WHERE id = ? AND token = ?");
$stmt->bind_param("is", $id, $token);
$stmt = $conn1->prepare("SELECT * FROM userdata WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result2 = $stmt->get_result();
$stmt->close();