織夢DedeCMS投票漏洞解決方法,織夢技術
導讀:織夢技術織夢技術DedeCMS投票漏洞是因為我們在獲取投票項時沒有進行任何過濾,從而可以讓人可以直接利用sql注入形式進行攻擊我們的系統了,下面我來給大家介紹解決辦法。dede手機模板織夢模板安裝。
打開//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['totalcountdede后臺模板9;]+1)."',votenote='".mysql_real_escape_string($items)."' WHERE aid='".mysql_real_escape_string($this->VoteID)."'&qudede模板免費ot;);
注:
* addslashes() 是強行加;
* mysql_real_escape_string() 會判斷字符集,但是對PHP版本有要求;(PHP 4 >= 4.0.3, PHP 5)
最好直接使用addslashes同時要查看你php是否默認打開了addslashes這個自dede手機模板動功能哦,如果有了我們就不用加了。
相關dede手機模板織夢模板安裝。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-19 ,文章織夢DedeCMS投票漏洞解決方法,織夢技術主要講述解決方法,漏洞,CMS網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_31148.html