Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
Disable JNDI lookups (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
comendantmc authored Dec 10, 2021
1 parent ba089bb commit e591764
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Spigot-Server-Patches/0397-Disable-JNDI-lookups.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From b8397483315af96d9d43f4b7afb3890f06637ef9 Mon Sep 17 00:00:00 2001
From: comendantmc <[email protected]>
Date: Fri, 10 Dec 2021 19:55:04 +0100
Subject: [PATCH] Disable JNDI lookups


diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 6711e6dff..0a3fdf384 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -3,21 +3,21 @@
<Appenders>
<TerminalConsole name="TerminalConsole">
<PatternLayout>
- <LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level]: [%logger] %minecraftFormatting{%msg}%n%xEx}">
+ <LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level]: [%logger] %msg{nolookups}%n%xEx}">
<!-- Log root, Minecraft, Mojang and Bukkit loggers without prefix -->
<!-- Disable prefix for various plugins that bypass the plugin logger -->
<PatternMatch key=",net.minecraft.,Minecraft,com.mojang.,com.sk89q.,ru.tehkode.,Minecraft.AWE"
- pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}%n%xEx}" />
+ pattern="%highlightError{[%d{HH:mm:ss} %level]: %msg{nolookups}%n%xEx}" />
</LoggerNamePatternSelector>
</PatternLayout>
</TerminalConsole>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
- <LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level]: [%logger] %minecraftFormatting{%msg}{strip}%n">
+ <LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level]: [%logger] %msg{nolookups}{strip}%n">
<!-- Log root, Minecraft, Mojang and Bukkit loggers without prefix -->
<!-- Disable prefix for various plugins that bypass the plugin logger -->
<PatternMatch key=",net.minecraft.,Minecraft,com.mojang.,com.sk89q.,ru.tehkode.,Minecraft.AWE"
- pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg}{strip}%n" />
+ pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}{strip}%n" />
</LoggerNamePatternSelector>
</PatternLayout>
<Policies>
@@ -36,5 +36,4 @@
<AppenderRef ref="TerminalConsole" level="info"/>
</Root>
</Loggers>
-</Configuration>
-
+</Configuration>
\ No newline at end of file
--
2.17.1

0 comments on commit e591764

Please sign in to comment.