Skip to content

Commit 52b0ab7

Browse files
authored
Merge pull request #1471 from ballerina-platform/trivy-fix
Update commons vfs version
2 parents 5fb314a + fb07934 commit 52b0ab7

File tree

10 files changed

+64
-23
lines changed

10 files changed

+64
-23
lines changed

ballerina/Ballerina.toml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
org = "ballerina"
33
name = "ftp"
4-
version = "2.13.0"
4+
version = "2.13.1"
55
authors = ["Ballerina"]
66
keywords = ["FTP", "SFTP", "remote file", "file transfer", "client", "service"]
77
repository = "https://github.com/ballerina-platform/module-ballerina-ftp"
@@ -15,8 +15,8 @@ graalvmCompatible = true
1515
[[platform.java21.dependency]]
1616
groupId = "org.apache.commons"
1717
artifactId = "commons-vfs2"
18-
version = "2.8.0"
19-
path = "./lib/commons-vfs2-2.8.0.jar"
18+
version = "2.10.0"
19+
path = "./lib/commons-vfs2-2.10.0.jar"
2020

2121
[[platform.java21.dependency]]
2222
groupId = "com.jcraft"
@@ -27,11 +27,23 @@ path = "./lib/jsch-0.1.55.jar"
2727
[[platform.java21.dependency]]
2828
groupId = "commons-net"
2929
artifactId = "commons-net"
30-
version = "3.9.0"
31-
path = "./lib/commons-net-3.9.0.jar"
30+
version = "3.11.1"
31+
path = "./lib/commons-net-3.11.1.jar"
32+
33+
[[platform.java21.dependency]]
34+
groupId = "commons-io"
35+
artifactId = "commons-io"
36+
version = "2.18.0"
37+
path = "./lib/commons-io-2.18.0.jar"
38+
39+
[[platform.java21.dependency]]
40+
groupId = "org.apache.commons"
41+
artifactId = "commons-lang3"
42+
version = "3.17.0"
43+
path = "./lib/commons-lang3-3.17.0.jar"
3244

3345
[[platform.java21.dependency]]
3446
groupId = "io.ballerina.stdlib"
3547
artifactId = "ftp-native"
36-
version = "2.13.0"
37-
path = "../native/build/libs/ftp-native-2.13.0.jar"
48+
version = "2.13.1"
49+
path = "../native/build/libs/ftp-native-2.13.1-SNAPSHOT.jar"

ballerina/CompilerPlugin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ id = "ftp-compiler-plugin"
33
class = "io.ballerina.stdlib.ftp.plugin.FtpCompilerPlugin"
44

55
[[dependency]]
6-
path = "../compiler-plugin/build/libs/ftp-compiler-plugin-2.13.0.jar"
6+
path = "../compiler-plugin/build/libs/ftp-compiler-plugin-2.13.1-SNAPSHOT.jar"

ballerina/Dependencies.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ distribution-version = "2201.12.0"
1010
[[package]]
1111
org = "ballerina"
1212
name = "ftp"
13-
version = "2.13.0"
13+
version = "2.13.1"
1414
dependencies = [
1515
{org = "ballerina", name = "io"},
1616
{org = "ballerina", name = "jballerina.java"},

ballerina/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ dependencies {
7373
externalJars(group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}") {
7474
transitive = false
7575
}
76+
externalJars(group: 'org.apache.commons', name: 'commons-lang3', version: "${commonsLang3Version}") {
77+
transitive = false
78+
}
79+
externalJars(group: 'commons-io', name: 'commons-io', version: "${commonsIoVersion}") {
80+
transitive = false
81+
}
7682
}
7783

7884
task updateTomlFiles {
@@ -87,6 +93,8 @@ task updateTomlFiles {
8793
def stdlibDependentMinaCoreVersion = project.minaCoreVersion
8894
def stdlibDependentAopallianceVersion = project.aopallianceVersion
8995
def stdlibDependentJclSlf4jVersion = project.jclSlf4jVersion
96+
def stdlibDependentCommonsIoVersion = project.commonsIoVersion
97+
def stdlibDependentCommonsLang3Version = project.commonsLang3Version
9098

9199
def newConfig = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version)
92100
newConfig = newConfig.replace("@toml.version@", tomlVersion)
@@ -100,6 +108,8 @@ task updateTomlFiles {
100108
newConfig = newConfig.replace("@mina.core.version@", stdlibDependentMinaCoreVersion)
101109
newConfig = newConfig.replace("@aopalliance.version@", stdlibDependentAopallianceVersion)
102110
newConfig = newConfig.replace("@jcl.slf4j.version@", stdlibDependentJclSlf4jVersion)
111+
newConfig = newConfig.replace("@commons.io.version@", stdlibDependentCommonsIoVersion)
112+
newConfig = newConfig.replace("@commons.lang3.version@", stdlibDependentCommonsLang3Version)
103113

104114
ballerinaTomlFile.text = newConfig
105115

build-config/resources/Ballerina.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ artifactId = "commons-net"
3030
version = "@commons.net.version@"
3131
path = "./lib/commons-net-@commons.net.version@.jar"
3232

33+
[[platform.java21.dependency]]
34+
groupId = "commons-io"
35+
artifactId = "commons-io"
36+
version = "@commons.io.version@"
37+
path = "./lib/commons-io-@commons.io.version@.jar"
38+
39+
[[platform.java21.dependency]]
40+
groupId = "org.apache.commons"
41+
artifactId = "commons-lang3"
42+
version = "@commons.lang3.version@"
43+
path = "./lib/commons-lang3-@commons.lang3.version@.jar"
44+
3345
[[platform.java21.dependency]]
3446
groupId = "io.ballerina.stdlib"
3547
artifactId = "ftp-native"

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ This file contains all the notable changes done to the Ballerina Email package t
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## [unreleased]
7+
8+
### Fixed
9+
10+
- [Address `CVE-2025-27553` vulnerability in Apache Commons VFS](https://github.com/ballerina-platform/ballerina-library/issues/7740)
11+
612
## [2.12.0] - 2025-02-11
713

814
### Changed

gradle.properties

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ version=2.13.1-SNAPSHOT
55
checkstylePluginVersion=10.12.0
66
testngVersion=7.6.1
77
slf4jVersion=1.7.30
8-
commonsVfsVersion=2.8.0
9-
commonsNetVersion=3.9.0
8+
commonsIoVersion=2.18.0
9+
commonsLang3Version=3.17.0
10+
commonsLoggingVersion=1.3.5
11+
commonsVfsVersion=2.10.0
12+
commonsNetVersion=3.11.1
1013
jschVersion=0.1.55
1114
mockFtpServerVersion=3.0.0
1215
sshdMinaVersion=1.1.1

native/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ dependencies {
3333
implementation group: 'io.ballerina.stdlib', name: 'io-native', version: "${stdlibIoVersion}"
3434
implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: "${slf4jVersion}"
3535
implementation group: 'org.apache.commons', name: 'commons-vfs2', version: "${commonsVfsVersion}"
36+
implementation group: 'org.apache.commons', name: 'commons-lang3', version: "${commonsLang3Version}"
37+
implementation group: 'commons-io', name: 'commons-io', version: "${commonsIoVersion}"
3638
}
3739

3840
checkstyle {

native/src/main/java/io/ballerina/stdlib/ftp/transport/server/util/FileTransportUtils.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,14 @@ private static void setSftpOptions(Map<String, String> options, FileSystemOption
8989
configBuilder.setUserDirIsRoot(opts, false);
9090
}
9191
if (options.get(FtpConstants.IDENTITY) != null) {
92-
try {
93-
IdentityInfo identityInfo;
94-
if (options.containsKey(IDENTITY_PASS_PHRASE)) {
95-
identityInfo = new IdentityInfo(new File(options.get(FtpConstants.IDENTITY)),
96-
options.get(IDENTITY_PASS_PHRASE).getBytes());
97-
} else {
98-
identityInfo = new IdentityInfo(new File(options.get(FtpConstants.IDENTITY)));
99-
}
100-
configBuilder.setIdentityInfo(opts, identityInfo);
101-
} catch (FileSystemException e) {
102-
throw new RemoteFileSystemConnectorException(e.getMessage(), e);
92+
IdentityInfo identityInfo;
93+
if (options.containsKey(IDENTITY_PASS_PHRASE)) {
94+
identityInfo = new IdentityInfo(new File(options.get(FtpConstants.IDENTITY)),
95+
options.get(IDENTITY_PASS_PHRASE).getBytes());
96+
} else {
97+
identityInfo = new IdentityInfo(new File(options.get(FtpConstants.IDENTITY)));
10398
}
99+
configBuilder.setIdentityInfo(opts, identityInfo);
104100
}
105101
if (options.get(FtpConstants.AVOID_PERMISSION_CHECK) != null) {
106102
try {

native/src/main/java/module-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
*/
1818

1919
module io.ballerina.stdlib.ftp {
20-
requires commons.vfs2;
2120
requires io.ballerina.runtime;
2221
requires io.ballerina.lang;
2322
requires io.ballerina.stdlib.io;
2423
requires io.ballerina.tools.api;
2524
requires org.slf4j;
2625
requires java.logging;
26+
requires org.apache.commons.vfs2;
2727
exports io.ballerina.stdlib.ftp.client;
2828
exports io.ballerina.stdlib.ftp.server;
2929
exports io.ballerina.stdlib.ftp.util;

0 commit comments

Comments
 (0)