您现在的位置是:首页 > 教程 > dedecms教程dedecms教程

织梦dedecms网站出现Safe Alert: Request Error step 1/2

陈莉汐2023-10-08 23:26:26dedecms教程已有人查阅

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

织梦DedeCms出现Safe Alert: Request Error step 1 ! 或Safe Alert: Request Error step 2!的解决方法
这是由于新版中使用了SQL语句防注入功能引了的安全警告,在自定义模模型中使用了下面名称
union|sleep|benchmark|load_file|outfile之一
都会引发这个警告,此外采集的内容,如果有 'union 这类语法也会出现在这个警告,
目前没有百%完美的解决方法又能增强安全,又能防止注入
可修改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 建立提供这文件的网址给我们作参考,以便及时修正。

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签