标签:
补丁文件:/web/source/site/article.ctrl.php
补丁来源:阿里云云盾自研
漏洞描述:微擎的/web/source/site/article.ctrl.php中对$_GPC[‘template‘]、$_GPC[‘title‘]、$_GPC[‘description‘]、$_GPC[‘source‘]、$_GPC[‘author‘]参数未进行正确转义过滤,导致SQL注入的产生
搜索代码 message(‘标题不能为空,请输入标题!‘);
如下图:

在 82 行 前添加代码
mysql_set_charset("gbk");$_GPC[‘template‘] = mysql_real_escape_string($_GPC[‘template‘]);$_GPC[‘title‘] = mysql_real_escape_string($_GPC[‘title‘]);$_GPC[‘description‘] = mysql_real_escape_string($_GPC[‘description‘]);$_GPC[‘source‘] = mysql_real_escape_string($_GPC[‘source‘]);$_GPC[‘author‘] = mysql_real_escape_string($_GPC[‘author‘]);
修改后如图:

标签:
原文地址:http://www.cnblogs.com/itwo/p/5721404.html