diff --git a/application/core/ErrorHandler.php b/application/core/ErrorHandler.php index d77f072e..d3c8981f 100644 --- a/application/core/ErrorHandler.php +++ b/application/core/ErrorHandler.php @@ -39,12 +39,12 @@ class ErrorHandler { $error['ManiaControlVersion'] = ManiaControl::VERSION; $error['OperatingSystem'] = php_uname(); $error['PHPVersion'] = phpversion(); - $error['ServerLogin'] = null; + $error['ServerLogin'] = null; $json = json_encode($error); $info = base64_encode($json); - $url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info; + $url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info); $success = FileUtil::loadFile($url); if (!json_decode($success)) { @@ -80,12 +80,12 @@ class ErrorHandler { $error['ManiaControlVersion'] = ManiaControl::VERSION; $error['OperatingSystem'] = php_uname(); $error['PHPVersion'] = phpversion(); - $error['ServerLogin'] = $this->maniaControl->server->login; + $error['ServerLogin'] = $this->maniaControl->server->login; $json = json_encode($error); $info = base64_encode($json); - $url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info; + $url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info); $success = FileUtil::loadFile($url); if (!json_decode($success)) { diff --git a/application/core/ManiaExchange/MXMapInfo.php b/application/core/ManiaExchange/MXMapInfo.php index c3b61560..706317ae 100644 --- a/application/core/ManiaExchange/MXMapInfo.php +++ b/application/core/ManiaExchange/MXMapInfo.php @@ -39,7 +39,7 @@ class MXMapInfo { $this->id = $mx->MapID; } - if (!isset($mx->GbxMapName) || $mx->GbxMapName == '') { + if (!isset($mx->GbxMapName) || $mx->GbxMapName == '?') { $this->name = $mx->Name; } else { $this->name = Formatter::stripDirtyCodes($mx->GbxMapName); diff --git a/application/core/Server/UsageReporter.php b/application/core/Server/UsageReporter.php index 4a7df9e7..dd24762a 100644 --- a/application/core/Server/UsageReporter.php +++ b/application/core/Server/UsageReporter.php @@ -3,6 +3,7 @@ namespace ManiaControl\Server; use ManiaControl\Callbacks\TimerListener; +use ManiaControl\Formatter; use ManiaControl\ManiaControl; use ManiaControl\UpdateManager; @@ -52,7 +53,7 @@ class UsageReporter implements TimerListener { $properties['PHPVersion'] = phpversion(); $properties['ServerLogin'] = $this->maniaControl->server->login; $properties['TitleId'] = $this->maniaControl->server->titleId; - $properties['ServerName'] = $this->maniaControl->server->getName(); + $properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->server->getName()); $properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount(); try { @@ -72,7 +73,7 @@ class UsageReporter implements TimerListener { $json = json_encode($properties); $info = base64_encode($json); - $this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . $info, function ($response, $error) { + $this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . urlencode($info), function ($response, $error) { $response = json_decode($response); if ($error || !$response) { $this->maniaControl->log("Error while Sending data: " . $error);