Skip to content

Commit

Permalink
Upgrade org.apache.logging.log4j:log4j-core and log4j-api libraries i…
Browse files Browse the repository at this point in the history
…n presto

Upgraded org.apache.logging.log4j:log4j-core from 2.17.1 to 2.24.3
Upgraded org.apache.logging.log4j:log4j-api from 2.17.1 to 2.24.3

Fixes almost 25 CVEs.
  • Loading branch information
Dilli-Babu-Godari authored and godaridillibabu committed Feb 11, 2025
1 parent 903520c commit 0016219
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<air.test.thread-count>2</air.test.thread-count>
<air.test.jvmsize>4g</air.test.jvmsize>
<grpc.version>1.68.0</grpc.version>
<dep.log4j.version>2.24.3</dep.log4j.version>

<air.javadoc.lint>-missing</air.javadoc.lint>
</properties>
Expand Down Expand Up @@ -233,6 +234,20 @@
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${dep.log4j.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${dep.log4j.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
Expand Down
11 changes: 7 additions & 4 deletions presto-cli/src/main/java/com/facebook/presto/cli/KeyReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
*/
package com.facebook.presto.cli;

import org.fusesource.jansi.AnsiConsole;

import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import static org.fusesource.jansi.internal.CLibrary.STDIN_FILENO;
import static org.fusesource.jansi.internal.CLibrary.isatty;

public final class KeyReader
{
private KeyReader() {}
Expand All @@ -47,7 +46,11 @@ public static int readKey()
private static boolean hasTerminal()
{
try {
return isatty(STDIN_FILENO) == 1;
//return isatty(STDIN_FILENO) == 1;
AnsiConsole.systemInstall();
boolean isAnsiSupported = AnsiConsole.isInstalled();
AnsiConsole.systemUninstall(); // Uninstall after check
return isAnsiSupported;
}
catch (Throwable e) {
return false;
Expand Down
1 change: 0 additions & 1 deletion presto-druid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

<properties>
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
<dep.log4j.version>2.17.1</dep.log4j.version>
</properties>

<repositories>
Expand Down
1 change: 0 additions & 1 deletion presto-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<properties>
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
<dep.log4j.version>2.17.1</dep.log4j.version>
<dep.elasticsearch.version>6.0.0</dep.elasticsearch.version>
</properties>

Expand Down
9 changes: 8 additions & 1 deletion presto-main/etc/catalog/iceberg.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
connector.name=iceberg
hive.metastore.uri=thrift://localhost:9083
hive.s3.path-style-access=true
hive.metastore=file
hive.metastore.catalog.dir=file:///Users/godaridillibabu/Downloads/minioIkc
hive.s3.endpoint=http://9.30.1.187:9000
hive.s3.aws-access-key=minioadmin
hive.s3.aws-secret-key=minioadmin
hive.temporary-staging-directory-path=file:///Users/godaridillibabu/Downloads/minioIkc
hive.s3.socket-timeout=1m

0 comments on commit 0016219

Please sign in to comment.