Make 1.5.0/1.5.1 decrypting data work
This commit is contained in:
@@ -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'] ?? '';
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user