dedecms会员中心pm.php注入漏洞修复方法
路径:/member/pm.php解决方法,编辑pm.php找到以下代码:
else if($dopost=='read') { $sql = "SELECT * FROM `#@__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; } $row = $dsql->GetOne("SELECT * FROM `#@__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 `#@__member_pms` SET hasview=1 WHERE id='$id' AND folder='inbox' AND toid='{$cfg_ml->M_ID}'"); $dsql->ExecuteNoneQuery("UPDATE `#@__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 `#@__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 `#@__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 `#@__member_pms` set hasview=1 where id='$id' And folder='inbox' And toid='{$cfg_ml->M_ID}'"); $dsql->ExecuteNoneQuery("Update `#@__member_pms` set hasview=1 where folder='outbox' And toid='{$cfg_ml->M_ID}'"); include_once(dirname(__FILE__).'/templets/pm-read.htm'); exit(); }
- 织梦dedecms后台自定义表单列表页美化
- 织梦dedecms防止自定义表单重复提交
- 织梦dedecms一键清空自定义表单内容
- 给织梦dedecms的自定义表单设置必填项
- dedecms留言板edit.inc.php注入漏洞修复方法
- dedecms中的media_add.php存在后台文件任意上传漏洞的修复方法
- dedecms中的uploadsafe.inc.php存在上传漏洞的修复方法
- dedecms中的article_add.php存在cookies泄漏导致SQL漏洞的修复方法
- dedecms会员中心mtypes.php注入漏洞修复方法
- wordpress的post.php任意文件删除漏洞临时修复方法
本文标题:《dedecms会员中心pm.php注入漏洞修复方法》
网址:https://zhangwenbao.com/dedecms-membership-center-pm-php-injection-vulnerability-repair-method.html