pgsql: Add a new GUC parameter backslash_quote, which determines whether

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a new GUC parameter backslash_quote, which determines whether
Date: 2006-05-21 20:11:58
Message-ID: 20060521201158.C83A19FA19B@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
pgsql/doc/src/sgml:
runtime.sgml (r1.215.2.8 -> r1.215.2.9)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/runtime.sgml.diff?r1=1.215.2.8&r2=1.215.2.9)
pgsql/src/backend/parser:
scan.l (r1.111.2.2 -> r1.111.2.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/scan.l.diff?r1=1.111.2.2&r2=1.111.2.3)
pgsql/src/backend/utils/misc:
guc.c (r1.164.2.4 -> r1.164.2.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c.diff?r1=1.164.2.4&r2=1.164.2.5)
postgresql.conf.sample (r1.92 -> r1.92.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample.diff?r1=1.92&r2=1.92.2.1)
pgsql/src/bin/psql:
tab-complete.c (r1.91.2.1 -> r1.91.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/tab-complete.c.diff?r1=1.91.2.1&r2=1.91.2.2)
pgsql/src/include/parser:
gramparse.h (r1.28 -> r1.28.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/gramparse.h.diff?r1=1.28&r2=1.28.4.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-05-21 20:12:20 pgsql: Add a new GUC parameter backslash_quote, which determines whether
Previous Message Tom Lane 2006-05-21 20:11:25 pgsql: Add a new GUC parameter backslash_quote, which determines whether