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

1)形成原因

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

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

2)解决方法

打开include下的dedesql.class.php找到如下构造函数

以下为引用的内容:

  1. function __construct($pconnect=false,$nconnect=true)
  2. {
  3. $this->isClose = false;
  4. $this->safeCheck = true;
  5. if($nconnect)
  6. {
  7. $this->Init($pconnect);
  8. }
  9. }

把其中的$this->safeCheck = true;改为$this->safeCheck = false;

编辑整理:数学课,如若转载,请注明出处:https://www.shuxueke.net/2022/12/25.html

(0)
数学课的头像数学课
上一篇 2022年12月7日 下午5:02
下一篇 2022年12月7日 下午9:26

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注