首页 > 原创文章 > 软件开发 > 查看文章

Dedecms cookies泄漏导致SQL漏洞 inc_archives_functions.php 的解决方法

所属分类:软件开发 来源: 丁老师原创 发布时间:2017-10-14 10:06 浏览: 5703 IP属地: 深圳

漏洞名称:dedecms cookies泄漏导致SQL漏洞

补丁文件:/member/inc/inc_archives_functions.php

补丁来源:丁老师电商开发自研

漏洞描述:dedecms的文章发表表单中泄漏了用于防御CSRF的核心cookie,同时在其他核心支付系统也使用了同样的cookie进行验证,黑客可利用泄漏的cookie通过后台验证,进行后台注入。

解决方法

1.打开\member\inc\inc_archives_functions.php文件,

找到239行,将

echo "<input type=\"hidden\" name=\"dede_fieldshash\" value=\"".md5($dede_addonfields.$cfg_cookie_encode)."\" />";

替换为:

echo "<input type=\"hidden\" name=\"dede_fieldshash\" value=\"".md5($dede_addonfields."dls6.com".$cfg_cookie_encode)."\" />";

如图:


2.批量搜索"$formfields.$cfg_cookie_encode"

3.将$formfields.$cfg_cookie_encode替换为$formfields."dls6.com".$cfg_cookie_encode

如图:


如果你不知道具体如何操作,或者是在打补丁的时候遇到了问题,不能解决,可以联系丁老师协助解决。


标签:

相关文章

Wordpress安装时出现Error es...

群里有个做外贸的朋友,准备使用wordpress建个外贸站,但是自己在安装时,却安装失败,提示“Error establishing a database connection”,这是什么原因,该怎么解决呢?故障分析:1.Error e...

CodeIgniter框架URL如果去掉in...

在使用PHP框架CI时,有个很恶心的地方就是他的URL需要带上index.php,比如我要建一个user模块,想要实现www.xxx.com/user/的效果,但是在CI框架下必须要www.xxx.com/index.php/user这...

Jeecg启动时org.springfram...

错误代码:[main] ERROR org.springframework.boot.SpringApplication:818 - Application run failed org.springframework.beans.fa...

Composer更新指定包

composer更新指定包的命令composer require alibabacloud/dysmsapi-20170525:2.0.24 --ignore-platform-reqs composer update alibabac...

推荐文章

php拼装sql语句,换行查询出错的问题解决

在php代码中,遇到复杂的sql语句,需要拼装sql语句,如:$sql='id 10;' $sql=' and( status in(1,2,3,4,5) and id not in (select id from ...

Mysql 1267 Illegal mix...

这个问题,用普通sql语句查询,好解决,把表的字符编码改为对应的就可以了。 但在使用视图查询时,比如select 'aaa' as type from xxx; select * from view where type=...

Mysql导入文件,source命令/php...

用phpmyadmin导入大数据库文件时,容易502 bad gateway,可以直接在linux上用mysql原生命令导入。1.上传sql文件到目录用Xshell登录服务器,将迁移过来的 sql 文件移到 home 目录下,方便下一步的...

Uniapp开发小程序内的图片扫码

在使用uniapp开发的小程序内,打开图片,长按没有弹出菜单,无法扫码,此时只需在图片上加入show-menu-by-longpress即可完整代码:<image :src="picture" mode="...

当前在线
免费咨询