summaryrefslogtreecommitdiff
path: root/doc/src/sgml/lobj.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/lobj.sgml')
-rw-r--r--doc/src/sgml/lobj.sgml11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index c0174b71bee..a663daffd1e 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -899,6 +899,17 @@ main(int argc, char **argv)
exit_nicely(conn);
}
+ /* Set always-secure search path, so malicous users can't take control. */
+ res = PQexec(conn,
+ "SELECT pg_catalog.set_config('search_path', '', false)");
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ fprintf(stderr, "SET failed: %s", PQerrorMessage(conn));
+ PQclear(res);
+ exit_nicely(conn);
+ }
+ PQclear(res);
+
res = PQexec(conn, "begin");
PQclear(res);
printf("importing file \"%s\" ...\n", in_filename);