主页 > 网站建设 > 建站知识 > 织梦DedeCms出现Safe Alert: Request Error step 1/2 ! 解决方

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

POST TIME:2017-11-30 21:47

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



收缩
  • 微信客服
  • 微信二维码
  • 电话咨询

  • 400-1100-266