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
if (getClientVersion() == "1.5.2") {
if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1" || getClientVersion() == "1.5.2") {
$post = getPostData();
$token = $post['gameSession'] ?? '';
$username = $post['userName'] ?? '';
} else if (getClientVersion() == "1.5.0" || getClientVersion() == "1.5.1") {
$token = decrypt($_POST['gameSession'] ?? '');
$username = decrypt($_POST['userName'] ?? '');
} else {
$token = $_POST['gameSession'] ?? '';
$username = $_POST['userName'] ?? '';

View File

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