Skip to content

Commit f1d2a09

Browse files
Updated the jars
1 parent 57b393e commit f1d2a09

File tree

16 files changed

+58
-32
lines changed

16 files changed

+58
-32
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To install the `cybersource-sdk-java` from central repository, add dependency to
1010
<dependency>
1111
<groupId>com.cybersource</groupId>
1212
<artifactId>cybersource-sdk-java</artifactId>
13-
<version>6.2.6</version>
13+
<version>6.2.7</version>
1414
</dependency>
1515
```
1616
Run `mvn install` to install dependency
@@ -183,6 +183,14 @@ Retry Pattern allows to retry sending a failed request and it will only work wit
183183

184184
## Changes
185185

186+
Version Cybersource-sdk-java 6.2.7 (MAR,2019)
187+
_______________________________
188+
189+
1)Fixed security vulnerabilities found in the jar dependencies. 1)xmlsec 2)opensaml 3)bcprov
190+
2)Modified Utility Test class.
191+
3)Updated the client version to 6.2.7 in utility class
192+
_______________________________
193+
186194
Version Cybersource-sdk-java 6.2.6 (MAY,2018)
187195
_______________________________
188196
1) Added certificateCacheEnabled optional feature. certificateCacheEnabled parameter is set to false (default is true), the p12 certificate of a merchant will be reloaded from filesystem every time a transaction is made.If the certificateCacheEnabled is true then only at the first time certificate of a merchant will loaded from filesystem.

java/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
<dependency>
189189
<groupId>org.apache.santuario</groupId>
190190
<artifactId>xmlsec</artifactId>
191-
<version>1.4.3</version>
191+
<version>2.0.7</version>
192192
</dependency>
193193
<dependency>
194194
<groupId>commons-httpclient</groupId>
@@ -204,12 +204,18 @@
204204
<dependency>
205205
<groupId>org.bouncycastle</groupId>
206206
<artifactId>bcprov-jdk15on</artifactId>
207-
<version>1.54</version>
207+
<version>1.61</version>
208208
</dependency>
209209
<dependency>
210210
<groupId>org.apache.ws.security</groupId>
211211
<artifactId>wss4j</artifactId>
212212
<version>1.6.19</version>
213+
<exclusions>
214+
<exclusion>
215+
<groupId>org.opensaml</groupId>
216+
<artifactId>opensaml</artifactId>
217+
</exclusion>
218+
</exclusions>
213219
</dependency>
214220
<dependency>
215221
<groupId>org.apache.commons</groupId>

java/src/main/java/com/cybersource/ws/client/Utility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private Utility() {
4848
/**
4949
* Version number of this release.
5050
*/
51-
public static final String VERSION = "6.2.6";
51+
public static final String VERSION = "6.2.7";
5252

5353
/**
5454
* If in the Request map, a key called "_has_escapes" is present and is set

java/src/test/java/com/cybersource/ws/client/UtilityTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
import java.io.*;
1010
import java.net.URL;
1111
import java.util.*;
12+
import java.util.stream.Collectors;
1213

1314
public class UtilityTest extends BaseTest {
1415
String propertiesFilename;
1516
Properties properties;
1617

1718
@Before
1819
public void setUp() {
19-
URL fileUrl = Thread.currentThread().getContextClassLoader().getResource("test_cybs.properties");
20-
String filepath = "";
21-
if(fileUrl != null) {
22-
propertiesFilename = fileUrl.getFile();
20+
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("test_cybs.properties");
21+
if(is != null) {
22+
propertiesFilename = new BufferedReader(new InputStreamReader(is)).lines().collect(Collectors.joining("\n"));
2323
try {
2424
properties = new Properties();
25-
properties.load(new FileReader(propertiesFilename));
25+
properties.load(is);
2626
} catch (IOException e) {
2727
fail("Unable to load properties file");
2828
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<groupId>com.cybersource</groupId>
2424
<artifactId>cybersource-sdk-master</artifactId>
25-
<version>6.2.7</version>
25+
<version>6.2.7-SNAPSHOT</version>
2626

2727

2828
</project>

samples/nvp/compileSample.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
set LOCAL_CP=
44
rem ----------------------------------------------------------------------------
5-
rem Replace this with cybersource-sdk-java-6.2.6.jar when using Java SDK 1.6 or later.
5+
rem Replace this with cybersource-sdk-java-6.2.7.jar when using Java SDK 1.6 or later.
66
rem If using this scripts outside zip package then give maven clean install.
77
rem This will generate all required dependencies under target/dependencies.These dependencies are used in CLASSPATH.
88
rem ----------------------------------------------------------------------------
99

10-
if exist ../../lib set LOCAL_CP=%LOCAL_CP%;../../lib/cybersource-sdk-java-6.2.6.jar
10+
if exist ../../lib set LOCAL_CP=%LOCAL_CP%;../../lib/cybersource-sdk-java-6.2.7-SNAPSHOT.jar
1111
if not exist ../../lib (
1212
if not exist target goto error
13-
set LOCAL_CP=%LOCAL_CP%;target/dependencies/cybersource-sdk-java-6.2.6.jar
13+
set LOCAL_CP=%LOCAL_CP%;target/dependencies/cybersource-sdk-java-6.2.7-SNAPSHOT.jar
1414
)
1515

1616
if not exist classes mkdir classes

samples/nvp/compileSample.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
LOCAL_CP=
44
# -----------------------------------------------------------------------------
5-
# Replace this with cybersource-sdk-java-6.2.6.jar when using Java SDK 1.6 or later.
5+
# Replace this with cybersource-sdk-java-6.2.7.jar when using Java SDK 1.6 or later.
66
# If using this scripts outside zip package then give maven clean install.
77
# This will generate all required dependencies under target/dependencies.These dependencies are used in CLASSPATH.
88
# -----------------------------------------------------------------------------
99

1010
if test -d ../../lib
11-
then LOCAL_CP=$LOCAL_CP:../../lib/cybersource-sdk-java-6.2.6.jar
11+
then LOCAL_CP=$LOCAL_CP:../../lib/cybersource-sdk-java-6.2.7-SNAPSHOT.jar
1212
fi
1313

1414
if test ! -d ../../lib
@@ -19,7 +19,7 @@ then
1919
echo "Execute maven clean install , This will generate all required dependencies under target/dependencies!!"
2020
exit 1
2121
fi
22-
LOCAL_CP=$LOCAL_CP:target/dependencies/cybersource-sdk-java-6.2.6.jar
22+
LOCAL_CP=$LOCAL_CP:target/dependencies/cybersource-sdk-java-6.2.7-SNAPSHOT.jar
2323
fi
2424

2525
if test ! -d ./classes

samples/nvp/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<dependency>
1212
<groupId>com.cybersource</groupId>
1313
<artifactId>cybersource-sdk-java</artifactId>
14-
<version>6.2.6</version>
14+
<version>6.2.7-SNAPSHOT</version>
1515
</dependency>
1616
<dependency>
1717
<groupId>commons-httpclient</groupId>
@@ -27,12 +27,18 @@
2727
<dependency>
2828
<groupId>org.bouncycastle</groupId>
2929
<artifactId>bcprov-jdk15on</artifactId>
30-
<version>1.54</version>
30+
<version>1.61</version>
3131
</dependency>
3232
<dependency>
3333
<groupId>org.apache.ws.security</groupId>
3434
<artifactId>wss4j</artifactId>
3535
<version>1.6.19</version>
36+
<exclusions>
37+
<exclusion>
38+
<groupId>org.opensaml</groupId>
39+
<artifactId>opensaml</artifactId>
40+
</exclusion>
41+
</exclusions>
3642
</dependency>
3743
<dependency>
3844
<groupId>org.apache.commons</groupId>

samples/nvp/runSample.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set LOCAL_CP=
44
set LOCAL_CP=%LOCAL_CP%;classes
55

66
rem ----------------------------------------------------------------------------
7-
rem Replace cybersource-sdk-java-6.2.6.jar when using Java SDK 1.6 or later.
7+
rem Replace cybersource-sdk-java-6.2.7.jar when using Java SDK 1.6 or later.
88
rem If using this scripts outside zip package then give maven clean install.
99
rem This will generate all required dependencies under target/dependencies.These dependencies are used in CLASSPATH.
1010
rem ----------------------------------------------------------------------------

samples/nvp/runSample.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LOCAL_CP=
44
LOCAL_CP=$LOCAL_CP:./classes
55

66
# -----------------------------------------------------------------------------
7-
# Replace this with cybersource-sdk-java-6.2.6.jar when using Java SDK 1.6 or later.
7+
# Replace this with cybersource-sdk-java-6.2.7.jar when using Java SDK 1.6 or later.
88
# If using this scripts outside zip package then give maven clean install.
99
# This will generate all required dependencies under target/dependencies.These dependencies are used in CLASSPATH.
1010
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)