Config: Removed log4j option

I decided implementing this feature wasn’t worth it.
Instead, I’m using a standalone mode to mitigate the log4j issue.
master
BodgeMaster 2023-06-09 12:46:47 +02:00
parent 467476a573
commit 9dd0991b01
2 changed files with 0 additions and 14 deletions

View File

@ -41,11 +41,6 @@ public class DeathChests {
Config.loadConfig(); Config.loadConfig();
Debug.out("Loaded config."); Debug.out("Loaded config.");
if (Config.fixLog4J) {
// TODO: Mitigate the Log4J security vulnerability if it's in any way convenient
Debug.err("Log4J fix is currently not implemented!");
}
} }
@EventHandler @EventHandler

View File

@ -12,8 +12,6 @@ public class Config {
public static final String config_file_name = "deathchests.txt"; public static final String config_file_name = "deathchests.txt";
public static File configDir = null; public static File configDir = null;
public static boolean debug = true;
public static boolean fixLog4J = true;
public static int maxDistance = 50; public static int maxDistance = 50;
public static boolean allowOtherPlayers = true; public static boolean allowOtherPlayers = true;
public static String notAllowedMessage = "§4Cannot get items from another player's death chest."; public static String notAllowedMessage = "§4Cannot get items from another player's death chest.";
@ -28,9 +26,6 @@ public class Config {
configOut += "\n\n# Enable debug output?\n"; configOut += "\n\n# Enable debug output?\n";
configOut += "debug="; configOut += "debug=";
configOut += debug ? "true" : "false"; configOut += debug ? "true" : "false";
configOut += "\n\n# Enable Log4Shell counter measures? (this feature is currently not implemented)\n";
configOut += "fixLog4J=";
configOut += fixLog4J ? "true" : "false";
configOut += "\n\n# The maximum search radius for finding a suitable location for placing the death chest\n"; configOut += "\n\n# The maximum search radius for finding a suitable location for placing the death chest\n";
configOut += "maxDistance="; configOut += "maxDistance=";
configOut += Integer.toString(maxDistance); configOut += Integer.toString(maxDistance);
@ -74,10 +69,6 @@ public class Config {
debug = configData.get(i).substring(equalsSign + 1).equals("true") ? true : false; debug = configData.get(i).substring(equalsSign + 1).equals("true") ? true : false;
break; break;
} }
case ("fixLog4J"): {
fixLog4J = configData.get(i).substring(equalsSign + 1).equals("true") ? true : false;
break;
}
case ("maxDistance"): { case ("maxDistance"): {
maxDistance = Integer.parseInt(configData.get(i).substring(equalsSign + 1)); maxDistance = Integer.parseInt(configData.get(i).substring(equalsSign + 1));
break; break;