Make 1.5.0/1.5.1 decrypting data work

This commit is contained in:
2025-12-31 19:25:44 -07:00
parent f511da6f21
commit 1cee054cd7
2 changed files with 2 additions and 5 deletions

View File

@@ -1,11 +1,8 @@
<?php <?php
if (getClientVersion() == "1.5.2") { if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
$post = getPostData(); $post = getPostData();
$token = $post['gameSession'] ?? ''; $token = $post['gameSession'] ?? '';
$username = $post['userName'] ?? ''; $username = $post['userName'] ?? '';
} else if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1") {
$token = decrypt($_POST['gameSession'] ?? '');
$username = decrypt($_POST['userName'] ?? '');
} else { } else {
$token = $_POST['gameSession'] ?? ''; $token = $_POST['gameSession'] ?? '';
$username = $_POST['userName'] ?? ''; $username = $_POST['userName'] ?? '';

View File

@@ -69,7 +69,7 @@ function getPostData() {
$decrypted = []; $decrypted = [];
foreach ($postData as $k => $v) { foreach ($postData as $k => $v) {
$decKey = decrypt($k); $decKey = (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1") ? $k : decrypt($k);
$decValue = decrypt($v); $decValue = decrypt($v);
$decrypted[$decKey] = $decValue; $decrypted[$decKey] = $decValue;
} }