Skip to content

Commit

Permalink
[api] Upgrades commons compress to 1.26.0 for CVE
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu committed Mar 5, 2024
1 parent ad076c8 commit ff18368
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
dependencies {
api "com.google.code.gson:gson:${gson_version}"
api "net.java.dev.jna:jna:${jna_version}"
api "org.apache.commons:commons-compress:${commons_compress_version}"
api ("org.apache.commons:commons-compress:${commons_compress_version}") {
exclude group: "org.apache.commons", module: "commons-lang3"
}
api "org.slf4j:slf4j-api:${slf4j_version}"

testImplementation("org.testng:testng:${testng_version}") {
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/ai/djl/util/TarUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.apache.commons.compress.utils.CloseShieldFilterInputStream;
import org.apache.commons.io.input.CloseShieldInputStream;

import java.io.BufferedInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -44,7 +44,7 @@ public static void untar(InputStream is, Path dir, boolean gzip) throws IOExcept
} else {
bis = new BufferedInputStream(is);
}
bis = new CloseShieldFilterInputStream(bis);
bis = CloseShieldInputStream.wrap(bis);
try (TarArchiveInputStream tis = new TarArchiveInputStream(bis)) {
TarArchiveEntry entry;
while ((entry = tis.getNextEntry()) != null) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ lightgbm_version=3.2.110
rapis_version=22.12.0

commons_cli_version=1.6.0
commons_compress_version=1.25.0
commons_compress_version=1.26.0
commons_csv_version=1.10.0
commons_logging_version=1.2
gson_version=2.10.1
Expand Down

0 comments on commit ff18368

Please sign in to comment.