博客
关于我
更新struts2到2.3.32
阅读量:553 次
发布时间:2019-03-09

本文共 1502 字,大约阅读时间需要 5 分钟。

背景:

struts2近日被曝存在远程代码执行的严重漏洞。目前Struts2官方已经确认漏洞

(漏洞编号
S2-045
,CVE编号:
cve-2017-5638
),并定级为高危。

由于该漏洞影响范围极广(Struts2.3.5 - Struts 2.3.31, Struts 2.5 - Struts 2.5.10),

漏洞危害程度极为严重,可直接获取应用系统所在服务器的控制权限。

漏洞相关信息请参考:http://www.myhack58.com/Article/html/3/62/2017/84040.htm


如果你当前的项目使用了
Struts2.3.5至 Struts 2.3.31版本
或者
Struts 2.5至Struts 2.5.10版本

必须替换的jar包:

1.
xwork-core-2.3.32.jar

2.
struts2-json-plugin-2.3.32.jar

3.
struts2-core-2.3.32.jar

可能需要替换或增加的jar包:

1.
struts2-spring-plugin-2.3.32.jar

2.
ognl-3.0.19.jar

3.
javassist-3.11.0.GA.jar

4.
freemarker-2.3.22.jar


可能需要增加的文件

1. struts-tags.tld (如果页面中有使用到struts标签的话,需要放置在WEB-INF文件夹下)

jar下载地址:

http://mvnrepository.com

https://.oschina/liufile/tools/attach_files

notes: 如果更新版本之后报如下错误:

Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener: java.lang.Nul

lPointerException
        at org.apache.tiles.util.URLUtil.getBaseTilesDefinitionURLs(URLUtil.java:54) [tiles-core-2.2.2.jar:2.2.2]
        at org.apache.struts2.tiles.StrutsTilesContainerFactory.getSourceURLs(StrutsTilesContainerFactory.java:229) [struts2-tiles-plugin-2
.3.32.jar:2.3.32]

可能是某些tiles文件找不到, 因为web.xml里默认的配置是

<context-param>

    <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
    <param-value>/tiles/tiles-common.xml,/tiles/tiles-auth.xml,/tiles/tiles-developer.xml,/tiles/tiles-seller.xml,/tiles/tiles-guest.xml,/tiles/tiles-admin.xml</param-value>
  </context-param>

看看这些tiles文件你本地是不是都有,如果没有并且没用就把web.xml里配置的对应tiles删除。

转载地址:http://urhiz.baihongyu.com/

你可能感兴趣的文章
nfs复习
查看>>
NFS安装配置
查看>>
NFS服务器配置-服务启动与停止
查看>>
NFS的安装以及windows/linux挂载linux网络文件系统NFS
查看>>
NFS的常用挂载参数
查看>>
NFS网络文件系统
查看>>
NFS远程目录挂载
查看>>
nft文件传输_利用remoting实现文件传输-.NET教程,远程及网络应用
查看>>
NFV商用可行新华三vBRAS方案实践验证
查看>>
ng build --aot --prod生成文件报错
查看>>
ng 指令的自定义、使用
查看>>
nghttp3使用指南
查看>>
Nginx
查看>>
nginx + etcd 动态负载均衡实践(一)—— 组件介绍
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + Tomcat + SpringBoot 部署项目
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>