mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 02:01:16 +02:00
When using libpq URI syntax, error out on invalid parameter names.
Dan Farina
This commit is contained in:
parent
f1438cf5c6
commit
3b5548a3d5
@ -4874,9 +4874,11 @@ conninfo_uri_parse_params(char *params,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,
|
printfPQExpBuffer(errorMessage,
|
||||||
libpq_gettext("WARNING: ignoring unrecognized URI query parameter: %s\n"),
|
libpq_gettext(
|
||||||
|
"invalid URI query parameter \"%s\"\n"),
|
||||||
keyword);
|
keyword);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (malloced)
|
if (malloced)
|
||||||
{
|
{
|
||||||
|
@ -59,8 +59,8 @@ trying postgresql://host/db?u%73er=someotheruser&port=12345
|
|||||||
user='someotheruser' dbname='db' host='host' port='12345' (inet)
|
user='someotheruser' dbname='db' host='host' port='12345' (inet)
|
||||||
|
|
||||||
trying postgresql://host/db?u%7aer=someotheruser&port=12345
|
trying postgresql://host/db?u%7aer=someotheruser&port=12345
|
||||||
WARNING: ignoring unrecognized URI query parameter: uzer
|
uri-regress: invalid URI query parameter "uzer"
|
||||||
dbname='db' host='host' port='12345' (inet)
|
|
||||||
|
|
||||||
trying postgresql://host:12345?user=uri-user
|
trying postgresql://host:12345?user=uri-user
|
||||||
user='uri-user' host='host' port='12345' (inet)
|
user='uri-user' host='host' port='12345' (inet)
|
||||||
@ -102,8 +102,8 @@ trying postgres://?host=/path/to/socket/dir
|
|||||||
host='/path/to/socket/dir' (local)
|
host='/path/to/socket/dir' (local)
|
||||||
|
|
||||||
trying postgresql://host?uzer=
|
trying postgresql://host?uzer=
|
||||||
WARNING: ignoring unrecognized URI query parameter: uzer
|
uri-regress: invalid URI query parameter "uzer"
|
||||||
host='host' (inet)
|
|
||||||
|
|
||||||
trying postgre://
|
trying postgre://
|
||||||
uri-regress: missing "=" after "postgre://" in connection info string
|
uri-regress: missing "=" after "postgre://" in connection info string
|
||||||
|
Loading…
Reference in New Issue
Block a user