forked from GeyserMC/Geyser
Add support for sensitive data in dumps (#1149)
* Add sensitive dumps * Add better arg handling and offline dumps * Add sensitive parameters for plugin IPs * Add sensitive property to the Bedrock remote address Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
This commit is contained in:
parent
4bcf44638e
commit
4af17df46f
7 changed files with 98 additions and 28 deletions
|
@ -28,6 +28,7 @@ package org.geysermc.platform.spigot;
|
|||
import lombok.Getter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.geysermc.connector.common.serializer.AsteriskSerializer;
|
||||
import org.geysermc.connector.dump.BootstrapDumpInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -50,7 +51,11 @@ public class GeyserSpigotDumpInfo extends BootstrapDumpInfo {
|
|||
this.platformVersion = Bukkit.getVersion();
|
||||
this.platformAPIVersion = Bukkit.getBukkitVersion();
|
||||
this.onlineMode = Bukkit.getOnlineMode();
|
||||
this.serverIP = Bukkit.getIp();
|
||||
if (AsteriskSerializer.showSensitive || (Bukkit.getIp().equals("") || Bukkit.getIp().equals("0.0.0.0"))) {
|
||||
this.serverIP = Bukkit.getIp();
|
||||
} else {
|
||||
this.serverIP = "***";
|
||||
}
|
||||
this.serverPort = Bukkit.getPort();
|
||||
this.plugins = new ArrayList<>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue