mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-15 10:55:20 +01:00
Don't include the database host, user or password in the debug.txt
This commit is contained in:
parent
e8574fcde7
commit
30b52b91ee
@ -87,7 +87,7 @@ public void execute(@NotNull CommandSender commandSender, @NotNull String mainCo
|
||||
writer.append(plugin.getDescription().getName()).append(" Version: ").append(plugin.getDescription().getVersion());
|
||||
writer.append("\nServer: ").append(Bukkit.getServer().getBukkitVersion()).append(" (").append(Bukkit.getServer().getVersion()).append(")");
|
||||
writer.append("\nJava: ").append(System.getProperty("java.version"));
|
||||
writer.append("\\n\\nPlugins:\n");
|
||||
writer.append("\n\nPlugins:\n");
|
||||
for(Plugin p : Bukkit.getServer().getPluginManager().getPlugins())
|
||||
{
|
||||
writer.append(p.getName()).append(' ').append(p.getDescription().getVersion()).append('\n');
|
||||
@ -99,6 +99,7 @@ public void execute(@NotNull CommandSender commandSender, @NotNull String mainCo
|
||||
while((line = configReader.readLine()) != null)
|
||||
{
|
||||
if(line.isEmpty()) continue;
|
||||
if(line.contains("Host") || line.contains("Password") || line.contains("User")) line = line.replaceAll("^(\\s+\\w+):.*$", "$1: ********");
|
||||
writer.append(line).append('\n');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user