Skip to content

Commit 82f9a4e

Browse files
committed
解决axis commons-fileupload 漏洞解决
1 parent ed57cc1 commit 82f9a4e

File tree

3 files changed

+18
-33
lines changed

3 files changed

+18
-33
lines changed

java110-common/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<groupId>com.java110</groupId>
3131
<artifactId>java110-config</artifactId>
3232
</dependency>
33-
33+
<!--
3434
<dependency>
3535
<groupId>org.apache.axis</groupId>
3636
<artifactId>axis</artifactId>
@@ -48,6 +48,7 @@
4848
<groupId>wsdl4j</groupId>
4949
<artifactId>wsdl4j</artifactId>
5050
</dependency>
51+
-->
5152

5253
<dependency>
5354
<groupId>commons-httpclient</groupId>

java110-common/src/main/java/com/java110/common/util/WebServiceAxisClient.java

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,13 @@
1010
import com.java110.common.constant.ResponseConstant;
1111
import com.java110.common.exception.BusinessException;
1212
import com.java110.common.log.LoggerEngine;
13-
import org.apache.axis.client.Call;
14-
import org.apache.axis.client.Service;
13+
//import org.apache.axis.client.Call;
14+
//import org.apache.axis.client.Service;
1515

1616

1717
public class WebServiceAxisClient extends LoggerEngine {
1818
public static void main(String[] args) {
19-
String url = "http://135.192.70.67:9084/serviceAgent/http/FactorageManager_ForAgent?AppKey=2017082401";
20-
String function = "queryOrderInfo";
2119

22-
String xml = "<QueryOrderInfoRequest>\n" +
23-
"\t<accNbr>18009706604</accNbr>\n" +
24-
"\t<accNbrType>1</accNbrType> \n" +
25-
"\t<areaCode>0971</areaCode>\n" +
26-
"\t<channelId></channelId>\n" +
27-
"\t<staffCode></staffCode> \t\n" +
28-
"</QueryOrderInfoRequest>";
29-
30-
try {
31-
Object retObj = WebServiceAxisClient.callWebService(url, function, new Object[]{xml});
32-
33-
34-
} catch (Exception e) {
35-
e.printStackTrace();
36-
}
3720
}
3821

3922
/**
@@ -64,17 +47,17 @@ public static Object callWebService(String url, String function, Object[] obj,In
6447
try {
6548
logger.debug("-----------开始调用Web Service-----------");
6649
// 创建Service对象,Service对用用于创建Call对象
67-
Service service = new Service();
68-
// 创建Call对象,Call对象用于调用服务
69-
Call call = (Call) service.createCall();
70-
// 为Call对象设置WebService的url
71-
call.setTargetEndpointAddress(new java.net.URL(url));
72-
// 为Call对象设置调用的方法名
73-
call.setOperationName(function);
74-
// 设置等待时间
75-
call.setTimeout(timeOut);
76-
// 调用WebService的方法,并获得返回值
77-
retObj = call.invoke(obj);
50+
// Service service = new Service();
51+
// // 创建Call对象,Call对象用于调用服务
52+
// Call call = (Call) service.createCall();
53+
// // 为Call对象设置WebService的url
54+
// call.setTargetEndpointAddress(new java.net.URL(url));
55+
// // 为Call对象设置调用的方法名
56+
// call.setOperationName(function);
57+
// // 设置等待时间
58+
// call.setTimeout(timeOut);
59+
// // 调用WebService的方法,并获得返回值
60+
// retObj = call.invoke(obj);
7861
logger.debug("-----------调用Web Service正常结束-----------");
7962
} catch (Exception e) {
8063
logger.error("-----------调用Web Service异常,原因:{}", e);

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<mysql.version>5.1.39</mysql.version>
6464
<commons-pool2.version>2.2</commons-pool2.version>
6565
<commons-collections.version>3.2.1</commons-collections.version>
66-
<commons-fileupload.version>1.3.1</commons-fileupload.version>
66+
<commons-fileupload.version>1.3.3</commons-fileupload.version>
6767
<commons-codec.version>1.6</commons-codec.version>
6868
<commons-logging.version>1.1.1</commons-logging.version>
6969
<commons-lang.version>2.5</commons-lang.version>
@@ -308,7 +308,7 @@
308308
</dependency>
309309

310310

311-
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2 -->
311+
<!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2
312312
<dependency>
313313
<groupId>org.apache.axis</groupId>
314314
<artifactId>axis</artifactId>
@@ -330,6 +330,7 @@
330330
<artifactId>wsdl4j</artifactId>
331331
<version>${axis.version}</version>
332332
</dependency>
333+
-->
333334

334335
<dependency>
335336
<groupId>net.sf.ehcache</groupId>

0 commit comments

Comments
 (0)