PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Since commit 71ea0d6795 ("Restrict psql meta-commands in plain-text dumps"),
> _reconnectToDB() in src/bin/pg_dump/pg_backup_archiver.c writes
> ahprintf(AH, "\\unrestrict %s\n", ropt->restrict_key);
> ...
> ahprintf(AH, "\\restrict %s\n\n", ropt->restrict_key);
> without checking ropt->restrict_key.
Yeah, that's bad. It's not surprising that nobody noticed for
tar-format "restore.sql" files, because those are pretty much
write-only; I don't know of any tool that uses them. I wonder
though if there's any other way to reach this ...
regards, tom lane