Skip to content

Commit d0850b4

Browse files
authored
Merge pull request #113 from DivyaDosibhatla/future
Future
2 parents 57b393e + 0dec210 commit d0850b4

File tree

16 files changed

+66
-33
lines changed

16 files changed

+66
-33
lines changed

README.md

Lines changed: 11 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,16 @@ 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+
xmlsec jar :-upgraded from version 1.4.3 to version 2.0.7
191+
opensaml jar :- Removed this jar as its not impacting our code base
192+
bcprov jar :- upgraded from version 1.54 to version 1.61
193+
194+
_______________________________
195+
186196
Version Cybersource-sdk-java 6.2.6 (MAY,2018)
187197
_______________________________
188198
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.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.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.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.jar
2323
fi
2424

2525
if test ! -d ./classes

samples/nvp/pom.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
<version>1.0.0</version>
88
<name>RunSample</name>
99
<url>http://maven.apache.org</url>
10+
<properties>
11+
<javasdk.version>[6.2.0, 6.2.8-SNAPSHOT]</javasdk.version>
12+
</properties>
1013
<dependencies>
1114
<dependency>
1215
<groupId>com.cybersource</groupId>
1316
<artifactId>cybersource-sdk-java</artifactId>
14-
<version>6.2.6</version>
17+
<version>${javasdk.version}</version>
1518
</dependency>
1619
<dependency>
1720
<groupId>commons-httpclient</groupId>
@@ -27,12 +30,18 @@
2730
<dependency>
2831
<groupId>org.bouncycastle</groupId>
2932
<artifactId>bcprov-jdk15on</artifactId>
30-
<version>1.54</version>
33+
<version>1.61</version>
3134
</dependency>
3235
<dependency>
3336
<groupId>org.apache.ws.security</groupId>
3437
<artifactId>wss4j</artifactId>
3538
<version>1.6.19</version>
39+
<exclusions>
40+
<exclusion>
41+
<groupId>org.opensaml</groupId>
42+
<artifactId>opensaml</artifactId>
43+
</exclusion>
44+
</exclusions>
3645
</dependency>
3746
<dependency>
3847
<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)