dedecms会员中心mtypes.php注入漏洞修复方法
路径:/member/mtypes.php编辑mtypes.php,找到如下代码:
elseif ($dopost == 'save') { if(isset($mtypeidarr) && is_array($mtypeidarr)) { $delids = '0'; $mtypeidarr = array_filter($mtypeidarr, 'is_numeric'); foreach($mtypeidarr as $delid) { $delid = HtmlReplace($delid); $delids .= ','.$delid; unset($mtypename[$delid]); } $query = "DELETE FROM `#@__mtypes` WHERE mtypeid IN ($delids) AND mid='$cfg_ml->M_ID';"; $dsql->ExecNoneQuery($query); } foreach ($mtypename as $id => $name) { $name = HtmlReplace($name); $query = "UPDATE `#@__mtypes` SET mtypename='$name' WHERE mtypeid='$id' AND mid='$cfg_ml->M_ID'"; $dsql->ExecuteNoneQuery($query); } ShowMsg('分类修改完成','mtypes.php'); }
用以下代码替换:
elseif ($dopost == 'save') { if(isset($mtypeidarr) && is_array($mtypeidarr)) { $delids = '0'; $mtypeidarr = array_filter($mtypeidarr, 'is_numeric'); foreach($mtypeidarr as $delid) { $delids .= ','.$delid; unset($mtypename[$delid]); } $query = "delete from `#@__mtypes` where mtypeid in ($delids) and mid='$cfg_ml->M_ID';"; $dsql->ExecNoneQuery($query); } //通过$mtypename进行key注入 foreach ($mtypename as $id => $name) { $name = HtmlReplace($name); /* 对$id进行规范化处理 */ $id = intval($id); /* */ $query = "update `#@__mtypes` set mtypename='$name' where mtypeid='$id' and mid='$cfg_ml->M_ID'"; $dsql->ExecuteNoneQuery($query); } ShowMsg('分类修改完成','mtypes.php'); }
- 织梦dedecms后台自定义表单列表页美化
- 织梦dedecms防止自定义表单重复提交
- 织梦dedecms一键清空自定义表单内容
- 给织梦dedecms的自定义表单设置必填项
- dedecms留言板edit.inc.php注入漏洞修复方法
- dedecms中的media_add.php存在后台文件任意上传漏洞的修复方法
- dedecms中的uploadsafe.inc.php存在上传漏洞的修复方法
- dedecms中的article_add.php存在cookies泄漏导致SQL漏洞的修复方法
- dedecms会员中心pm.php注入漏洞修复方法
- wordpress的post.php任意文件删除漏洞临时修复方法
本文标题:《dedecms会员中心mtypes.php注入漏洞修复方法》
网址:https://zhangwenbao.com/dedecms-member-center-mtypes-php-injection-vulnerability-repair-method.html