Bump log4j dependency (keep in sync with 1.12.2)

This commit is contained in:
Gabriele C 2022-10-27 02:08:02 +02:00
parent 3741fb4cec
commit d7437bd2b1
2 changed files with 14 additions and 11 deletions

14
pom.xml
View File

@ -67,7 +67,7 @@
<maven.minimumVersion>3.6.3</maven.minimumVersion>
<!-- Dependencies versions -->
<spigot.version>1.19-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.19.2-R0.1-SNAPSHOT</spigot.version>
<!-- Versioning properties -->
<project.outputName>AuthMe</project.outputName>
@ -649,7 +649,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.5</version>
<version>2.8.1</version> <!-- Log4J version bundled in 1.12.2 -->
<scope>provided</scope>
</dependency>
@ -657,7 +657,7 @@
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
<version>4.0.3</version> <!-- Latest java 8 release -->
<optional>true</optional>
<exclusions>
<exclusion>
@ -670,7 +670,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<version>1.7.36</version> <!-- We can't update to 2.x as long as we use HikariCP for java 8 -->
<optional>true</optional>
</dependency>
@ -684,9 +684,9 @@
<!-- MySQL connector, shaded into the legacy jar -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.31</version>
<optional>true</optional>
</dependency>
<dependency>

View File

@ -4,8 +4,11 @@ import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.when;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.core.Filter.Result;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.message.Message;
import org.junit.Test;
import org.mockito.Mockito;
@ -134,7 +137,7 @@ public class Log4JFilterTest {
@Test
public void shouldFilterSensitiveObjectMessage() {
// given / when
Result result = log4JFilter.filter(null, null, null, SENSITIVE_COMMAND, new Exception());
Result result = log4JFilter.filter(null, null, null, (Object) SENSITIVE_COMMAND, new Exception());
// then
assertThat(result, equalTo(Result.DENY));
@ -152,7 +155,7 @@ public class Log4JFilterTest {
@Test
public void shouldNotFilterIrrelevantMessage() {
// given / when
Result result = log4JFilter.filter(null, null, null, OTHER_COMMAND, new Exception());
Result result = log4JFilter.filter(null, null, null, (Object) OTHER_COMMAND, new Exception());
// then
assertThat(result, equalTo(Result.NEUTRAL));
@ -161,7 +164,7 @@ public class Log4JFilterTest {
@Test
public void shouldNotFilterNonSensitiveCommand() {
// given / when
Result result = log4JFilter.filter(null, null, null, NORMAL_COMMAND, new Exception());
Result result = log4JFilter.filter(null, null, null, (Object) NORMAL_COMMAND, new Exception());
// then
assertThat(result, equalTo(Result.NEUTRAL));
@ -209,7 +212,7 @@ public class Log4JFilterTest {
@Test
public void shouldNotFilterNullMessage() {
// given / when
Result result = log4JFilter.filter(null, null, null, null, new Exception());
Result result = log4JFilter.filter(null, null, null, (Object) null, new Exception());
// then
assertThat(result, equalTo(Result.NEUTRAL));