网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 DedeCMS投票模块漏洞的解决方法
范文
    打开/include/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)
    * mysql_escape_string不考虑连接的当前字符集。(PHP 4 >= 4.0.3, PHP 5, 注意:在PHP5.3中已经弃用这种方法,不推荐使用)
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/16 6:52:28