织梦园模板网专注于织梦企业模板、DeDe整站模板、织梦Html5模板等织梦模板的下载,提供DEDE织梦模板相关服务。织梦园织梦模板交流群
用户名:
密码:
注册
注册后享受折扣价

织梦DedeCMS投票漏洞解决方法

织梦园模板 / 2021-01-23 / 收藏
打开//dedevote.class.php文件,查 找
$this->dsql->ExecuteNoneQuery("UPDATE `dede_vote` SET totalcount='".($this->VoteInfos['totalcount']+1)."',votenote='".addslashes($items)."' WHERE aid='".$this->VoteID."'");
修改为
$this->dsql->ExecuteNoneQuery("UPDATE `dede_vote` SET totalcount='".($this->VoteInfos['totalcount']+1)."',votenote='".mysql_real_escape_string($items)."' WHERE aid='".mysql_real_escape_string($this->VoteID)."'");

注:

* addslashes() 是强行加;

* mysql_real_escape_string()  会判断字符集,但是对PHP版本有要求;(PHP 4 >= 4.0.3, PHP 5)

***好直接使用addslashes同时要查看你php是否默认打开了addslashes这个自动功能哦,如果有了我们就不用加了。

相关安装使用

收缩