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

你可能感兴趣的文章
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
no1
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NOAA(美国海洋和大气管理局)气象数据获取与POI点数据获取
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
node exporter完整版
查看>>