Wemeng CMS/dedecms system appears safe alert: Request Error

Source: Internet
Author: User
Dedecms appears safe alert: Request error Step 1! Or safe alert: Request error Step 2! Solution

1) cause

This is because the SQL statement anti-injection function is used in the new version as a security warning. This warning is triggered when Union | sleep | benchmark | load_file | OUTFILE is used in the custom model, in addition, if 'union and other syntaxes are collected, this warning will also appear,

Currently, there are no 100% perfect solutions, which can enhance security and prevent injection. You can modify the DB base class of dedecms to disable the security check.

2) Solution

Open dedesql. Class. php under include and find the following constructor:

Reference content is as follows:

  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. }

Change $ this-> safecheck = true to $ this-> safecheck = false;

Errors caused by this file will generate an md5_safe.txt file in the data file for reference.

However, for most websites, if they can run normally, we recommend that you do not modify them!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.