mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-03-01 12:26:26 +00:00
Include Log4jPatcher javaagent (#2148)
This commit is contained in:
committed by
GitHub
parent
b64cf0b84f
commit
bab381d058
@@ -77,6 +77,16 @@ if ${useFallbackJvmFlag}; then
|
||||
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
: # No patch required here.
|
||||
elif versionLessThan 1.18.1; then
|
||||
if isTrue ${SKIP_LOG4J_PATCHER:-false}; then
|
||||
log "Skipping Log4jPatcher, make sure you are not affected"
|
||||
else
|
||||
JVM_OPTS="-javaagent:/image/Log4jPatcher.jar ${JVM_OPTS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if isTrue ${ENABLE_ROLLING_LOGS:-false}; then
|
||||
if ! ${canUseRollingLogs}; then
|
||||
log "ERROR: Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
|
||||
|
||||
Reference in New Issue
Block a user