Skip to content

Commit 095dfcc

Browse files
HADOOP-18088. Replace log4j 1.x with reload4j. (#4052)
Co-authored-by: Wei-Chiu Chuang <[email protected]> Includes HADOOP-18354. Upgrade reload4j to 1.22.2 due to XXE vulnerability (#4607). Log4j 1.2.17 has been replaced by reloadj 1.22.2 SLF4J is at 1.7.36
1 parent 7651afd commit 095dfcc

File tree

37 files changed

+186
-95
lines changed

37 files changed

+186
-95
lines changed

LICENSE-binary

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/nvd3-1.8.5.* (css and js
210210
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/AbstractFuture.java
211211
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/TimeoutFuture.java
212212

213+
ch.qos.reload4j:reload4j:1.2.22
213214
com.aliyun:aliyun-java-sdk-core:4.5.10
214215
com.aliyun:aliyun-java-sdk-kms:2.11.0
215216
com.aliyun:aliyun-java-sdk-ram:3.1.0
@@ -294,7 +295,6 @@ io.reactivex:rxjava-string:1.1.1
294295
io.reactivex:rxnetty:0.4.20
295296
io.swagger:swagger-annotations:1.5.4
296297
javax.inject:javax.inject:1
297-
log4j:log4j:1.2.17
298298
net.java.dev.jna:jna:5.2.0
299299
net.minidev:accessors-smart:1.2
300300
org.apache.avro:avro:1.9.2
@@ -489,11 +489,10 @@ org.checkerframework:checker-qual:2.5.2
489489
org.codehaus.mojo:animal-sniffer-annotations:1.21
490490
org.jruby.jcodings:jcodings:1.0.13
491491
org.jruby.joni:joni:2.1.2
492-
org.slf4j:jul-to-slf4j:jar:1.7.25
493-
org.ojalgo:ojalgo:43.0:compile
494-
org.slf4j:jul-to-slf4j:1.7.25
495-
org.slf4j:slf4j-api:1.7.25
496-
org.slf4j:slf4j-log4j12:1.7.25
492+
org.ojalgo:ojalgo:43.0
493+
org.slf4j:jul-to-slf4j:1.7.36
494+
org.slf4j:slf4j-api:1.7.36
495+
org.slf4j:slf4j-reload4j:1.7.36
497496

498497

499498
CDDL 1.1 + GPLv2 with classpath exception

hadoop-assemblies/src/main/resources/assemblies/hadoop-dynamometer.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<excludes>
6767
<!-- use slf4j from common to avoid multiple binding warnings -->
6868
<exclude>org.slf4j:slf4j-api</exclude>
69-
<exclude>org.slf4j:slf4j-log4j12</exclude>
69+
<exclude>org.slf4j:slf4j-reload4j</exclude>
7070
</excludes>
7171
</dependencySet>
7272
</dependencySets>

hadoop-assemblies/src/main/resources/assemblies/hadoop-hdfs-nfs-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
4141
<!-- use slf4j from common to avoid multiple binding warnings -->
4242
<exclude>org.slf4j:slf4j-api</exclude>
43-
<exclude>org.slf4j:slf4j-log4j12</exclude>
43+
<exclude>org.slf4j:slf4j-reload4j</exclude>
4444
<exclude>org.hsqldb:hsqldb</exclude>
4545
</excludes>
4646
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-httpfs-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
7070
<!-- use slf4j from common to avoid multiple binding warnings -->
7171
<exclude>org.slf4j:slf4j-api</exclude>
72-
<exclude>org.slf4j:slf4j-log4j12</exclude>
72+
<exclude>org.slf4j:slf4j-reload4j</exclude>
7373
<exclude>org.hsqldb:hsqldb</exclude>
7474
</excludes>
7575
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-kms-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
7070
<!-- use slf4j from common to avoid multiple binding warnings -->
7171
<exclude>org.slf4j:slf4j-api</exclude>
72-
<exclude>org.slf4j:slf4j-log4j12</exclude>
72+
<exclude>org.slf4j:slf4j-reload4j</exclude>
7373
<exclude>org.hsqldb:hsqldb</exclude>
7474
</excludes>
7575
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-mapreduce-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
180180
<!-- use slf4j from common to avoid multiple binding warnings -->
181181
<exclude>org.slf4j:slf4j-api</exclude>
182-
<exclude>org.slf4j:slf4j-log4j12</exclude>
182+
<exclude>org.slf4j:slf4j-reload4j</exclude>
183183
<exclude>org.hsqldb:hsqldb</exclude>
184184
<exclude>jdiff:jdiff:jar</exclude>
185185
</excludes>

hadoop-assemblies/src/main/resources/assemblies/hadoop-nfs-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<exclude>org.apache.hadoop:hadoop-hdfs</exclude>
4141
<!-- use slf4j from common to avoid multiple binding warnings -->
4242
<exclude>org.slf4j:slf4j-api</exclude>
43-
<exclude>org.slf4j:slf4j-log4j12</exclude>
43+
<exclude>org.slf4j:slf4j-reload4j</exclude>
4444
<exclude>org.hsqldb:hsqldb</exclude>
4545
</excludes>
4646
</dependencySet>

hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
<exclude>org.apache.hadoop:hadoop-pipes</exclude>
230230
<!-- use slf4j from common to avoid multiple binding warnings -->
231231
<exclude>org.slf4j:slf4j-api</exclude>
232-
<exclude>org.slf4j:slf4j-log4j12</exclude>
232+
<exclude>org.slf4j:slf4j-reload4j</exclude>
233233
</excludes>
234234
</dependencySet>
235235
</dependencySets>

hadoop-assemblies/src/main/resources/assemblies/hadoop-yarn-dist.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
<exclude>org.apache.hadoop:*</exclude>
310310
<!-- use slf4j from common to avoid multiple binding warnings -->
311311
<exclude>org.slf4j:slf4j-api</exclude>
312-
<exclude>org.slf4j:slf4j-log4j12</exclude>
312+
<exclude>org.slf4j:slf4j-reload4j</exclude>
313313
<exclude>org.hsqldb:hsqldb</exclude>
314314
</excludes>
315315
</dependencySet>

hadoop-client-modules/hadoop-client-check-invariants/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
<exclude>org.slf4j:slf4j-api</exclude>
8585
<!-- Leave commons-logging unshaded so downstream users can configure logging. -->
8686
<exclude>commons-logging:commons-logging</exclude>
87-
<!-- Leave log4j unshaded so downstream users can configure logging. -->
88-
<exclude>log4j:log4j</exclude>
87+
<!-- Leave reload4j unshaded so downstream users can configure logging. -->
88+
<exclude>ch.qos.reload4j:reload4j</exclude>
8989
<!-- Leave javax annotations we need exposed -->
9090
<exclude>com.google.code.findbugs:jsr305</exclude>
9191
<!-- Leave bouncycastle unshaded because it's signed with a special Oracle certificate so it can be a custom JCE security provider -->

0 commit comments

Comments
 (0)