mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
CrashDump: revert removal of RCON password redact in 738e310798
there's guaranteed to be some plant pot who uses 4.0, leaks his RCON password, downgrades back to 3.x, and then gets hacked.
This commit is contained in:
@ -52,6 +52,7 @@ use function ob_start;
|
|||||||
use function php_uname;
|
use function php_uname;
|
||||||
use function phpinfo;
|
use function phpinfo;
|
||||||
use function phpversion;
|
use function phpversion;
|
||||||
|
use function preg_replace;
|
||||||
use function str_split;
|
use function str_split;
|
||||||
use function strpos;
|
use function strpos;
|
||||||
use function strtoupper;
|
use function strtoupper;
|
||||||
@ -172,6 +173,7 @@ class CrashDump{
|
|||||||
if($this->server->getProperty("auto-report.send-settings", true) !== false){
|
if($this->server->getProperty("auto-report.send-settings", true) !== false){
|
||||||
$this->data["parameters"] = (array) $argv;
|
$this->data["parameters"] = (array) $argv;
|
||||||
$this->data["server.properties"] = @file_get_contents($this->server->getDataPath() . "server.properties");
|
$this->data["server.properties"] = @file_get_contents($this->server->getDataPath() . "server.properties");
|
||||||
|
$this->data["server.properties"] = preg_replace("#^rcon\\.password=(.*)$#m", "rcon.password=******", $this->data["server.properties"]);
|
||||||
$this->data["pocketmine.yml"] = @file_get_contents($this->server->getDataPath() . "pocketmine.yml");
|
$this->data["pocketmine.yml"] = @file_get_contents($this->server->getDataPath() . "pocketmine.yml");
|
||||||
}else{
|
}else{
|
||||||
$this->data["pocketmine.yml"] = "";
|
$this->data["pocketmine.yml"] = "";
|
||||||
|
Reference in New Issue
Block a user