aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/postgresql.conf.sample
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-05-21 20:11:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-05-21 20:11:02 +0000
commit3d4dc1acf5047c2067c411e3403c27c5c41f45cf (patch)
tree8e578bb3d22964718f8c801fe360db2159f23901 /src/backend/utils/misc/postgresql.conf.sample
parent8fe643b41b93823f8db54149f3b5b3741d6c3613 (diff)
downloadpostgresql-3d4dc1acf5047c2067c411e3403c27c5c41f45cf.tar.gz
postgresql-3d4dc1acf5047c2067c411e3403c27c5c41f45cf.zip
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 the SQL-standard representation "''" (two single quote marks), but it has been used often enough that just disallowing it immediately won't do. Hence backslash_quote allows the settings "on", "off", and "safe_encoding", the last meaning to allow "\'" only if client_encoding is a valid server encoding. That is now the default, and the reason is that in encodings such as SJIS that allow 0x5c (ASCII backslash) to be the last byte of a multibyte character, accepting "\'" allows SQL-injection attacks as per CVE-2006-2314 (further details will be published after release). The "on" setting is available for backward compatibility, but it must not be used with clients that are exposed to untrusted input. Thanks to Akio Ishida and Yasuo Ohgaki for identifying this security issue.
Diffstat (limited to 'src/backend/utils/misc/postgresql.conf.sample')
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 773899e8b77..b1bdd3b4be4 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -413,10 +413,11 @@
# - Previous Postgres Versions -
#add_missing_from = off
-#regex_flavor = advanced # advanced, extended, or basic
-#sql_inheritance = on
+#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = off
+#regex_flavor = advanced # advanced, extended, or basic
+#sql_inheritance = on
# - Other Platforms & Clients -