postgresql/src/bin
Tom Lane f39ddd8436 Sanitize newlines in object names in "pg_restore -l" output.
Commits 89e0bac86 et al replaced newlines with spaces in object names
printed in SQL comments, but we neglected to consider that the same
names are also printed by "pg_restore -l", and a newline would render
the output unparseable by "pg_restore -L".  Apply the same replacement
in "-l" output.  Since "pg_restore -L" doesn't actually examine any
object names, only the dump ID field that starts each line, this is
enough to fix things for its purposes.

The previous fix was treated as a security issue, and we might have
done that here as well, except that the issue was reported publicly
to start with.  Anyway it's hard to see how this could be exploited
for SQL injection; "pg_restore -L" doesn't do much with the file
except parse it for leading integers.

Per bug #14587 from Milos Urbanek.  Back-patch to all supported versions.

Discussion: https://postgr.es/m/20170310155318.1425.30483@wrigleys.postgresql.org
2017-03-10 14:15:09 -05:00
..
initdb Un-break things on IPv6-less platforms. 2017-03-10 12:17:56 -05:00
pg_archivecleanup pg_archivecleanup: Add NLS 2016-11-04 10:40:05 -04:00
pg_basebackup Enable replication connections by default in pg_hba.conf 2017-03-09 08:39:44 -05:00
pg_config Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_controldata Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). 2017-03-07 14:25:40 +02:00
pg_ctl Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_dump Sanitize newlines in object names in "pg_restore -l" output. 2017-03-10 14:15:09 -05:00
pg_resetwal Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_rewind Fix inclusions of c.h from .h files. 2017-03-08 20:58:17 -05:00
pg_test_fsync pg_test_fsync: Add NLS 2016-11-04 10:40:05 -04:00
pg_test_timing pg_test_timing: Add NLS 2016-11-04 10:40:05 -04:00
pg_upgrade Fix hard-coded relkind constants in assorted src/bin files. 2017-03-09 22:42:16 -05:00
pg_waldump pg_waldump: Remove extra newline in error message 2017-03-08 10:08:32 -05:00
pgbench Fix pgbench's failure to honor the documented long-form option "--builtin". 2017-03-07 11:36:42 -05:00
pgevent Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
psql Fix hard-coded relkind constants in assorted src/bin files. 2017-03-09 22:42:16 -05:00
scripts Fix hard-coded relkind constants in assorted src/bin files. 2017-03-09 22:42:16 -05:00
Makefile Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00