后知后觉,今天才开始修复Struts2的漏洞

详细情形可以参考:

http://struts.apache.org/release/2.3.x/docs/security-bulletins.html

本次的升级是把struts2.3.1.2升级到2.3.15.1

全部更新:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
两个版本相同的:
aopalliance-1.0.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
commons-logging-api-1.1.jar
ezmorph-1.0.6.jar
guava-r09.jar
stax2-api-3.1.1.jar
xml-resolver-1.2.jar
  
替换(**为补丁需要替换的):
asm-3.3.jar -> asm-3.2.jar
** commons-fileupload-1.3.jar -> commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar -> commons-io-1.4.jar
** add  commons-lang3-3.1.jar  
commons-logging-1.1.3.jar -> commons-logging-1.1.1.jar
cxf-api-2.7.4.jar -> cxf-api-2.5.0.jar
cxf-rt-bindings-soap-2.7.4.jar -> cxf-rt-bindings-soap-2.5.0.jar
cxf-rt-bindings-xml-2.7.4.jar -> cxf-rt-bindings-xml-2.5.0.jar
cxf-rt-core-2.7.4.jar -> cxf-rt-core-2.5.0.jar
cxf-rt-databinding-jaxb-2.7.4.jar -> cxf-rt-databinding-jaxb-2.5.0.jar
cxf-rt-frontend-jaxws-2.7.4.jar -> cxf-rt-frontend-jaxws-2.5.0.jar
cxf-rt-frontend-simple-2.7.4.jar -> cxf-rt-frontend-simple-2.5.0.jar
cxf-rt-transports-http-2.7.4.jar -> cxf-rt-transports-http-2.5.0.jar
cxf-rt-ws-addr-2.7.4.jar -> cxf-rt-ws-addr-2.5.0.jar
freemarker-2.3.19.jar -> freemarker-2.3.16.jar
jackson-core-asl-1.9.2.jar -> jackson-core-asl-1.6.0.jar
jackson-mapper-asl-1.9.2.jar -> jackson-mapper-asl-1.6.0.jar
  
neethi-3.0.2.jar -> neethi-3.0.1.jar
** ognl-3.0.6.jar -> ognl-3.0.4.jar
** struts2-convention-plugin-2.3.15.1.jar -> struts2-convention-plugin-2.3.1.2.jar
** struts2-core-2.3.15.1.jar -> struts2-core-2.3.1.2.jar
  
** struts2-jfreechart-plugin-2.3.1.2.jar -> struts2-jfreechart-plugin-2.3.15.1.jar
** struts2-spring-plugin-2.3.1.2.jar -> struts2-spring-plugin-2.3.15.1.jar
woodstox-core-asl-4.2.0.jar -> woodstox-core-asl-4.1.1.jar
wsdl4j-1.6.3.jar -> wsdl4j-1.6.2.jar
xmlschema-core-2.0.3.jar -> xmlschema-core-2.0.1.jar
** xwork-core-2.3.15.1.jar -> xwork-core-2.3.1.2.jar

如果只针对修复漏洞,只需要更新

1
2
3
4
5
6
7
8
9
10
替换
** commons-fileupload-1.3.jar -> commons-fileupload-1.2.2.jar
** ognl-3.0.6.jar -> ognl-3.0.4.jar
** struts2-convention-plugin-2.3.15.1.jar -> struts2-convention-plugin-2.3.1.2.jar
** struts2-core-2.3.15.1.jar -> struts2-core-2.3.1.2.jar
** struts2-jfreechart-plugin-2.3.1.2.jar -> struts2-jfreechart-plugin-2.3.15.1.jar
** struts2-spring-plugin-2.3.1.2.jar -> struts2-spring-plugin-2.3.15.1.jar
** xwork-core-2.3.15.1.jar -> xwork-core-2.3.1.2.jar
增加
** add  commons-lang3-3.1.jar

如果web.xml引用到

ActionContextCleanUp,还会恶心的报这个Warning!!!!!!!

1
2
3
4
5
6
7
8
9
10
11
***************************************************************************
*                                 WARNING!!!                              *
*                                                                         *
* >>> ActionContextCleanUp <<< is deprecated! Please use the new filters! *
*                                                                         *
*             This can be a source of unpredictable problems!             *
*                                                                         *
*                Please refer to the docs for more details!               *
*              http://struts.apache.org/2.x/docs/webxml.html              *
*                                                                         *
***************************************************************************

为了清净我们的耳目,只能把ActionContextCleanUp的配置清除掉

1
2
3
4
  <filter>
 <filter-name>struts2CleanupFilter</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>

可以替换成另外的实现

1
2
3
4
<filter>
   <filter-name>StrutsPrepareFilter</filter-name>
   <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>

DONE!

Struts升级到2.3.15.1抵抗漏洞的更多相关文章

  1. Python 2.6.6升级到Python2.7.15

    最近在使用Python处理MySQL数据库相关问题时,需要用到Python2.7.5及以上版本,而centos6.5等版本操作系统默认自带的版本为2.6.6,因此需要对python进行升级. Pyth ...

  2. Nginx升级加固SSL/TLS协议信息泄露漏洞(CVE-2016-2183)

    Nginx升级加固SSL/TLS协议信息泄露漏洞(CVE-2016-2183) 漏洞说明 // 基于Nginx的https网站被扫描出SSL/TLS协议信息泄露漏洞(CVE-2016-2183),该漏 ...

  3. struts2从2.2.3升级到2.3.15.1步骤

    1. 删除以下jar包 asm-3.1.jar asm-commons-3.1.jar commons-beanutils-1.7.0.jar commons-fileupload-1.2.2.jar ...

  4. struts升级到最高版本后遇到的问题。关于actionmessage传递问题。

    Struts2升级到最新版本遇到的一些问题 首先是更换对应的jar,如asm.common.ongl.struts等等.更换后发现系统启动不了,按照网上的介绍,先后又更新了slf4j-log4j12- ...

  5. struts升级2.3.12到2.5.13

    参考文章: http://www.ituring.com.cn/article/495914 http://blog.csdn.net/zhangchen1987/article/details/78 ...

  6. MacOS下PHP7.1升级到PHP7.4.15

    最近写SDK的时候需要用到object类型提示符,PHPStorm智能提示说需要PHP7.2以上才能支持这种类型提示. 我一查我本机的PHP是7.1.30版本,于是考虑升级一下PHP版本. 首先要尝试 ...

  7. nginx平滑升级(1.14--1.15)

    查看旧版nginx编译参数 [root@localhost yum.repos.d]# nginx -V nginx version: nginx/1.14.2 built by gcc 4.8.5 ...

  8. CentOS6.x服务器OpenSSH平滑升级到7.3p版本——拒绝服务器漏洞攻击

    对于新安装的Linux服务器,默认OpenSSH及OpenSSL都不是最新的,需要进行升级以拒绝服务器漏洞攻击.本次介绍的是升级生产环境下CentOS6.x系列服务器平滑升级OpenSSL及OpenS ...

  9. 15.Nginx 解析漏洞复现

    Nginx 解析漏洞复现 Nginx解析漏洞复现. 版本信息: Nginx 1.x 最新版 PHP 7.x最新版 由此可知,该漏洞与Nginx.php版本无关,属于用户配置不当造成的解析漏洞. 使用d ...

随机推荐

  1. assert函数(python)

    assert语句: 用以检查某一条件是否为True,若该条件为False则会给出一个AssertionError. 用法: assert type(x)=int and x>=0 如果不满足后面 ...

  2. javax.naming.NameNotFoundException

    2015-08-27 09:53:16,463 [localhost-startStop-1] DEBUG [org.springframework.jndi.JndiTemplate] - Look ...

  3. Hadoop on Mac with IntelliJ IDEA - 1 解决input path does not exist问题

    本文讲述使用IntelliJ IDEA时遇到Hadoop提示input path does not exist(输入路径不存在)的解决过程. 环境:Mac OS X 10.9.5, IntelliJ ...

  4. POJ 1979 dfs和bfs两种解法

      fengyun@fengyun-server:~/learn/acm/poj$ cat 1979.cpp #include<cstdio> #include<iostream&g ...

  5. 【转】WPF颜色相关操作

        using System.Windows.Media; 1.String转换成Color Color color = (Color)ColorConverter.ConvertFromStri ...

  6. Hash Table构建

    get-item e:\test\* |format-table @{name="aa";expression={$_.name.tostring().split(".& ...

  7. Linux用户及用户组设置

    查看当前用户所属的组 groups  查看<user1>, <user2> 和 <user3>所属的组 groups <user1> <user2 ...

  8. 合并js文件minify实例

    将min目录放入项目中后,js中引入方式是: <script type="text/javascript" src="__PUBLIC__/min/?b=publi ...

  9. yii user 组件

    yii/web/user enableAutoLogin:如果未登录,则会从cookie中登录 autoRenewCookie: 如果登录了,则会使用renewIdentityCookie更新cook ...

  10. PHP+ MongoDB

    环境: uname -v # SMP Debian -+deb7u2 php -v PHP -~dotdeb. (cli) (built: Jun ::) Copyright (c) - The PH ...