pgsql: Reject, in pg_dumpall, names containing CR or LF.

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: Reject, in pg_dumpall, names containing CR or LF.
Дата
Msg-id E1bWlGS-0006n8-7W@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Reject, in pg_dumpall, names containing CR or LF.

These characters prematurely terminate Windows shell command processing,
causing the shell to execute a prefix of the intended command.  The
chief alternative to rejecting these characters was to bypass the
Windows shell with CreateProcess(), but the ability to use such names
has little value.  Back-patch to 9.1 (all supported versions).

This change formally revokes support for these characters in database
names and roles names.  Don't document this; the error message is
self-explanatory, and too few users would benefit.  A future major
release may forbid creation of databases and roles so named.  For now,
check only at known weak points in pg_dumpall.  Future commits will,
without notice, reject affected names from other frontend programs.

Also extend the restriction to pg_dumpall --dbname=CONNSTR arguments and
--file arguments.  Unlike the effects on role name arguments and
database names, this does not reflect a broad policy change.  A
migration to CreateProcess() could lift these two restrictions.

Reviewed by Peter Eisentraut.

Security: CVE-2016-5424

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/142c24c23447f212e642a0ffac9af878b93f490d

Modified Files
--------------
src/bin/pg_dump/pg_dumpall.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: pgsql: Reject, in pg_dumpall, names containing CR or LF.
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: Introduce a psql "\connect -reuse-previous=on|off" option.