织梦DedeCms中出现Safe Alert: Request Error step 1/2 的解决方法

来源:互联网 发布:网络中的信息载体 编辑:程序博客网 时间:2024/04/29 03:02

织梦DedeCMS出现Safe Alert: Request Error step 1 ! 或Safe Alert: Request Error step 2!的解决方法
这是由于新版中使用了SQL语句防注入功能引了的安全警告,在自定义模模型中使用了下面名称
union|sleep|benchmark|load_file|outfile之一
都会引发这个警告,此外采集的内容,如果有 ‘union 这类语法也会出现在这个警告,
目前没有100%完美的解决方法又能增强安全,又能防止注入
可修改dedecms的db基类把安全检查关掉
打开include下的dedesql.class.php找到构造函数


代码如下:

function __construct($pconnect=false,$nconnect=true)
{
$this->isClose = false;
$this->safeCheck = true;
if($nconnect)
{
$this->Init($pconnect);
}
}

把$this->safeCheck = true;改为$this->safeCheck = false;
但是对于大多数网站,如果能正常运行,建议不要修改

此文件导致的错误会在 data 中生成一个 md5_safe.txt 建立提供这文件的网址给我们作参考,以便及时修正。


文章来源:武汉八音猫科技 http://www.bayinmao.com

0 0
原创粉丝点击