Struts2版本升级

栏目:eas cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-22浏览:1

Struts2版本升级

【关联漏洞代码】

    CVE-2020-17530、CVE-2017-5638、CVE-2013-1966、CVE-2017-12611、CVE-2013-4316、CVE-2011-3923、CVE-2017-9791、CVE-2019-0230、CVE-2014-0094、CVE-2014-0113、CVE-2010-1870、CVE-2013-2248、CVE-2017-9805、CVE-2016-1000031、CVE-2013-2251、CVE-2018-1327、CVE-2018-11776、CVE-2016-4438、CVE-2021-31805、CVE-2023-50164

【前置条件】

    EAS服务器使用JDK版本至少为1.7及以上。如不确定,请参考:JDK版本查询

【影响范围】

    门户、单点登录

【备注】

    EAS Cloud V8.8.0及以上版本不适用,请提单咨询标准补丁支持

【升级步骤】

    1、EAS版本查询。如不确定,请参考:EAS版本查询

    2、struts2文件与相关依赖升级(升级包见文后附件)

        EAS版本为800


         (1) 将/server/lib/common/trd/struts2-core-旧版本号.jar 替换为 struts2-core-2.5.33.jar

         (2) 将/server/lib/common/trd/struts2-spring-plugin-旧版本号.jar 替换为 struts2-spring-plugin-2.5.33.jar

          (3) 将4个jar包   

                    log4j-api-2.12.4.jar

                    commons-lang3-3.8.1.jar 

                    ognl-3.1.29.jar

                    freemarker-2.3.31.jar

                放到私包目录/server/lib/sp

        

        EAS版本为820以上


        (1) 将/server/lib/common/trd/struts2-core-旧版本号.jar 替换为 struts2-core-2.5.33.jar

        (2) 将/server/lib/common/trd/struts2-spring-plugin-旧版本号.jar 替换为 struts2-spring-plugin-2.5.33.jar

        (3) 将log4j-api-2.12.4.jar和commons-lang3-3.8.1.jar 放到私包目录/server/lib/sp


    3、配置文件修改(之前已经改过的不用重复修改)

        方式一:手动修改(推荐方式)

            server\deploy\portal.ear\plt_bi.war\WEB-INF\web.xml

            server\deploy\portal.ear\plt_budget.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_cm.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_cp.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_document.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_hr.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_ibusiness.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_ireport.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_iservice.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_portal.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_scm.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_sp.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_tfv.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_wfpc.war\WEB-INF\web.xml 

            server\deploy\portal.ear\plt_widget.war\WEB-INF\web.xml

            server\deploy\portal.ear\portal.war\WEB-INF\web.xml

            server\deploy\eas.ear\light_cp.war\WEB-INF\web.xml

            server\deploy\eas.ear\cslrpt.war\WEB-INF\web.xml

            将以上文件里面的内容

            org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

            替换为

            org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter

            

            org.apache.struts2.dispatcher.FilterDispatcher

            替换为

            org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter


        方式二:脚本替换(适用于linux环境)

            #切换到相关目录

            cd {EAS_HOME}/eas/server/deploy/portal.ear/

            #替换备份命令1

            find . -name 'web.xml' | xargs sed -i.bak -c 's/org\.apache\.struts2\.dispatcher\.FilterDispatcher/org\.apache\.struts2\.dispatcher\.filter\.StrutsPrepareAndExecuteFilter/g'

            #替换备份命令2

            find . -name 'web.xml' | xargs sed -i.bak -c 's/org\.apache\.struts2\.dispatcher\.ng\.filter\./org\.apache\.struts2\.dispatcher\.filter\./g'

            注:EAS_HOME替换成实际服务器路径

            

    4、重启EAS服务


【其他】

    如启动时提示非法组件,请参考:重新生成基准文件方法

EAS800-struts2升级包.zip

EAS820及以上-struts2升级包.zip

Struts2版本升级

【关联漏洞代码】 CVE-2020-17530、CVE-2017-5638、CVE-2013-1966、CVE-2017-12611、CVE-2013-4316、CVE-2011-3923、CVE-2017-9791、CVE...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息