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:
- Function _ construct ($ pconnect = false, $ nconnect = true)
- {
- $ This-> isclose = false;
- $ This-> safecheck = true;
- If ($ nconnect)
- {
- $ This-> Init ($ pconnect );
- }
- }
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!