postgresql/src/bin
Tom Lane 0c0a95c2f8 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 Translation updates 2017-02-06 12:35:49 -05:00
pg_basebackup Fix help message for pg_basebackup -R 2017-02-18 13:48:15 +01:00
pg_config Translation updates 2017-02-06 12:35:49 -05:00
pg_controldata Translation updates 2017-02-06 12:35:49 -05:00
pg_ctl Translation updates 2017-02-06 12:35:49 -05:00
pg_dump Sanitize newlines in object names in "pg_restore -l" output. 2017-03-10 14:15:09 -05:00
pg_resetxlog Translation updates 2017-02-06 12:35:49 -05:00
pgevent pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
psql Translation updates 2017-02-06 12:35:49 -05:00
scripts Translation updates 2017-02-06 12:35:49 -05:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00