/member/pm.php 这个是dedecms注入漏洞,处理方案如下:
打开/member/pm.php,搜索:
else if($dopost=='read') {
$sql = "SELECT * FROM `dede_member_friends` WHERE mid='{$cfg_ml->M_ID}' AND ftype!='-1' ORDER BY addtime DESC LIMIT 20";
$friends = array(); $dsql->SetQuery($sql);
$dsql->Execute(); while ($row = $dsql->GetArray()) {
$friends[] = $row; } //$id注入
$row = $dsql->GetOne("SELECT * FROM `dede_member_pms` WHERE id='$id' AND (fromid='{$cfg_ml->M_ID}' OR toid='{$cfg_ml->M_ID}')");//ID没过滤
if(!is_array($row)) { ShowMsg('对不起,你指定的消息不存在或你没权限查看!','-1');
exit(); } //$id注入
$dsql->ExecuteNoneQuery("UPDATE `dede_member_pms` SET hasview=1 WHERE id='$id' AND folder='inbox' AND toid='{$cfg_ml->M_ID}'");
$dsql->ExecuteNoneQuery("UPDATE `dede_member_pms` SET hasview=1 WHERE folder='outbox' AND toid='{$cfg_ml->M_ID}'");
include_once(dirname(__FILE__).'/templets/pm-read.htm'); exit(); }
替换为:
else if($dopost=='read') {
$sql = "Select * From `dede_member_friends` where mid='{$cfg_ml->M_ID}' And ftype!='-1' order by addtime desc limit 20";
$friends = array(); $dsql->SetQuery($sql);
$dsql->Execute(); while ($row = $dsql->GetArray()) {
$friends[] = $row; } /* $id过滤 */ $id = intval($id);
/* */
$row = $dsql->GetOne("Select * From `dede_member_pms` where id='$id' And (fromid='{$cfg_ml->M_ID}' Or toid='{$cfg_ml->M_ID}')");
if(!is_array($row)) {
ShowMsg('对不起,你指定的消息不存在或你没权限查看!','-1'); exit(); }
$dsql->ExecuteNoneQuery("Update `dede_member_pms` set hasview=1 where id='$id' And folder='inbox' And toid='{$cfg_ml->M_ID}'");
$dsql->ExecuteNoneQuery("Update `dede_member_pms` set hasview=1 where folder='outbox' And toid='{$cfg_ml->M_ID}'");
include_once(dirname(__FILE__).'/templets/pm-read.htm');
exit(); }
标签:
织梦dedecms注入漏洞pm.php修复方法
本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。