Skip to main content
 Web开发网 » 站长学院 » 织梦教程

系统出现Safe Alert: Request Error step 1/2 ! 解决方法

2020年09月12日13610百度已收录

注意:本教程适用于 织梦DedeCMS V5.6

 

       织梦dedecms出现Safe Alert: Request Error step 1 ! 或Safe Alert: Request Error step 2!的解决方法

 

1)形成原因

 

       这是由于新版中使用了SQL语句防注入功能引了的安全警告,在自定义模模型中使用了 union|sleep|benchmark|load_file|outfile之一都会引发这个警告,此外采集的内容,如果有 ‘union 这类语法也会出现在这个警告,

 

 

目前没有100%完美的解决方法又能增强安全,又能防止注入。可修改dedecms的db基类把安全检查关掉!

 

2)解决方法

 

       打开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 建立提供这文件的网址给我们作参考,以便及时修正。

 

 

       但是对于大多数网站,如果能正常运行,建议不要修改!


 

评论列表暂无评论
发表评论
微信