博客
关于我
更新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/

你可能感兴趣的文章
nginx + etcd 动态负载均衡实践(一)—— 组件介绍
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + Tomcat + SpringBoot 部署项目
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>
Nginx - Header详解
查看>>
nginx - thinkphp 如何实现url的rewrite
查看>>
Nginx - 反向代理、负载均衡、动静分离、底层原理(案例实战分析)
查看>>
Nginx - 反向代理与负载均衡
查看>>
nginx 1.24.0 安装nginx最新稳定版
查看>>
nginx 301 永久重定向
查看>>
nginx 301跳转
查看>>
nginx 403 forbidden
查看>>
nginx connect 模块安装以及配置
查看>>
nginx css,js合并插件,淘宝nginx合并js,css插件
查看>>
Nginx gateway集群和动态网关
查看>>
nginx http配置说明,逐渐完善。
查看>>
Nginx keepalived一主一从高可用,手把手带你一步一步配置!
查看>>