forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb3eb4ea
committed
Add a new GUC parameter backslash_quote, which determines whether the SQL
parser will allow "\'" to be used to represent a literal quote mark. The"\'" representation has been deprecated for some time in favor of theSQL-standard representation "''" (two single quote marks), but it has beenused often enough that just disallowing it immediately won't do. Hencebackslash_quote allows the settings "on", "off", and "safe_encoding",the last meaning to allow "\'" only if client_encoding is a valid serverencoding. That is now the default, and the reason is that in encodingssuch as SJIS that allow 0x5c (ASCII backslash) to be the last byte of amultibyte character, accepting "\'" allows SQL-injection attacks as perCVE-2006-2314 (further details will be published after release). The"on" setting is available for backward compatibility, but it must not beused with clients that are exposed to untrusted input.Thanks to Akio Ishida and Yasuo Ohgaki for identifying this security issue.1 parentc61a2f5 commitb3eb4ea
File tree
5 files changed
+98
-4
lines changed- doc/src/sgml
- src
- backend
- parser
- utils/misc
- include/parser
5 files changed
+98
-4
lines changedLines changed: 37 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
3695 | 3695 |
| |
3696 | 3696 |
| |
3697 | 3697 |
| |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
3698 | 3734 |
| |
3699 | 3735 |
| |
3700 | 3736 |
| |
|
Lines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
| |||
452 | 453 |
| |
453 | 454 |
| |
454 | 455 |
| |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
455 | 467 |
| |
456 | 468 |
| |
457 | 469 |
| |
|
Lines changed: 38 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
| 141 | + | |
141 | 142 |
| |
142 | 143 |
| |
143 | 144 |
| |
| |||
210 | 211 |
| |
211 | 212 |
| |
212 | 213 |
| |
| 214 | + | |
213 | 215 |
| |
214 | 216 |
| |
215 | 217 |
| |
| |||
1716 | 1718 |
| |
1717 | 1719 |
| |
1718 | 1720 |
| |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
1719 | 1730 |
| |
1720 | 1731 |
| |
1721 | 1732 |
| |
| |||
6056 | 6067 |
| |
6057 | 6068 |
| |
6058 | 6069 |
| |
| 6070 | + | |
| 6071 | + | |
| 6072 | + | |
| 6073 | + | |
| 6074 | + | |
| 6075 | + | |
| 6076 | + | |
| 6077 | + | |
| 6078 | + | |
| 6079 | + | |
| 6080 | + | |
| 6081 | + | |
| 6082 | + | |
| 6083 | + | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
6059 | 6096 |
| |
6060 | 6097 |
| |
6061 | 6098 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
414 | 414 |
| |
415 | 415 |
| |
416 | 416 |
| |
| 417 | + | |
417 | 418 |
| |
418 | 419 |
| |
419 | 420 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 |
| |
| 38 | + | |
31 | 39 |
| |
32 | 40 |
| |
33 | 41 |
| |
|
0 commit comments
Comments
(0)