@@ -27,20 +27,22 @@ You can generate SQL statements quite safely with the Query Builder. However,
27
27
it is not designed to prevent SQL injection no matter what data you pass.
28
28
29
29
Arguments passed to the Query Builder can be:
30
- 1. **identifiers ** such as field or table names
30
+ 1. **identifiers ** such as field ( or table) names
31
31
2. their **values **
32
32
3. a part of **SQL strings **
33
33
34
34
The Query Builder will escape all **values ** by default.
35
35
36
- It will also try its best to properly protect **identifiers **
37
- and identifiers in **SQL strings ** by default.
38
- However, flexibility is a priority and is far from perfect.
36
+ It will also try to properly protect **identifiers ** and identifiers in
37
+ **SQL strings ** by default.
38
+ However, it is implemented to work well in many use cases and
39
+ is not designed to prevent all attacks.
39
40
Therefore, you should never feed in user input to them without proper validation.
40
41
41
42
Also, many methods have the ``$escape `` parameter that can be set to disable escaping.
42
- If ``$escape `` is set to false, no protection is provided, so you must ensure that
43
- they are properly escaped or protected by yourself.
43
+ If ``$escape `` is set to false, no protection is provided by the Query Builder,
44
+ so you must ensure by yourself that
45
+ they are properly escaped or protected before passing it to the Query Builder.
44
46
The same is true when using ``RawSql ``, which specifies a raw SQL statement.
45
47
46
48
*************************
0 commit comments