Struts2漏洞修复到2.3.15.1版本步骤



1.删除的jar包
jsonplugin-0.30.jar(此jar由struts2-json-plugin-2.3.15.1.jar代替,如果以前采用过其他jsonplugin插件的话)

2.添加的jar包
commons-lang3-3.1.jar
struts2-json-plugin-2.3.15.1.jar

3.替换的jar包
将原有低版本的ognl-x.x.x.jar替换为ognl-3.0.6.jar
将原有低版本的struts2-core-x.x.x.x.jar替换为struts2-core-2.3.15.1.jar
将原有低版本的xwork-core-x.x.x.x.jar替换为xwork-core-2.3.15.1.jar
将原有低版本的javassist-x.x.x.jar替换为javassist-3.11.0.GA.jar

4.xwork-conversion.properties
注释掉java.lang.Enum=com.opensymphony.xwork2.util.EnumTypeConverter

5.替换工程中所有*.xml Struts配置文件中type="redirect-action"为type="redirectAction",并将xml的头部信息修改为:

[html]  view plain copy
  1. <!DOCTYPE struts PUBLIC  
  2.     "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"  
  3.     "http://struts.apache.org/dtds/struts-2.3.dtd">  


6.修改struts.xml中返回类型为json的处理类相关的配置。(如果你的工程原来采用的是其他的json类型处理插件的话)
将其中片段修改成如下状态:
[html]  view plain copy
  1. <result-types>  
  2.             <!-- 添加的自定义类型JSON对象 -->  
  3.             <!-- 
  4.                 <result-type name="json" class="com.googlecode.jsonplugin.JSONResult" /> 
  5.             -->  
  6.             <result-type name="json" class="org.apache.struts2.json.JSONResult" />  
  7. </result-types>  

7.所有涉及到jsonplugin-0.30.jar的类由struts2-json-plugin-2.3.15.1.jar中的对应类替换。(如果你的工程原来采用的是其他的json类型处理插件的话)

8.struts2标签库的升级
将原有的struts-tag.tld升级为最新。

1.删除的jar包
jsonplugin-0.30.jar(此jar由struts2-json-plugin-2.3.15.1.jar代替,如果以前采用过其他jsonplugin插件的话)

2.添加的jar包
commons-lang3-3.1.jar
struts2-json-plugin-2.3.15.1.jar

3.替换的jar包
将原有低版本的ognl-x.x.x.jar替换为ognl-3.0.6.jar
将原有低版本的struts2-core-x.x.x.x.jar替换为struts2-core-2.3.15.1.jar
将原有低版本的xwork-core-x.x.x.x.jar替换为xwork-core-2.3.15.1.jar
将原有低版本的javassist-x.x.x.jar替换为javassist-3.11.0.GA.jar

4.xwork-conversion.properties
注释掉java.lang.Enum=com.opensymphony.xwork2.util.EnumTypeConverter

5.替换工程中所有*.xml Struts配置文件中type="redirect-action"为type="redirectAction",并将xml的头部信息修改为:

[html]  view plain copy
  1. <!DOCTYPE struts PUBLIC  
  2.     "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"  
  3.     "http://struts.apache.org/dtds/struts-2.3.dtd">  


6.修改struts.xml中返回类型为json的处理类相关的配置。(如果你的工程原来采用的是其他的json类型处理插件的话)
将其中片段修改成如下状态:
[html]  view plain copy
  1. <result-types>  
  2.             <!-- 添加的自定义类型JSON对象 -->  
  3.             <!-- 
  4.                 <result-type name="json" class="com.googlecode.jsonplugin.JSONResult" /> 
  5.             -->  
  6.             <result-type name="json" class="org.apache.struts2.json.JSONResult" />  
  7. </result-types>  

7.所有涉及到jsonplugin-0.30.jar的类由struts2-json-plugin-2.3.15.1.jar中的对应类替换。(如果你的工程原来采用的是其他的json类型处理插件的话)

8.struts2标签库的升级
将原有的struts-tag.tld升级为最新。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
==================================================================== * The OpenSymphony Software License, Version 1.1 * * (this license is derived and fully compatible with the Apache Software * License - see http://www.apache.org/LICENSE.txt) * * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * OpenSymphony Group (http://www.opensymphony.com/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "OpenSymphony" and "The OpenSymphony Group" * must not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact license@opensymphony.com . * * 5. Products derived from this software may not be called "OpenSymphony" * or "XWork", nor may "OpenSymphony" or "XWork" appear in their * name, without prior written permission of the OpenSymphony Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIB
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值