mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-06 18:16:55 +02:00
Sort out paired double quotes in \connect, \password and \crosstabview.
In arguments, these meta-commands wrongly treated each pair as closing the double quoted string. Make the behavior match the documentation. This is a compatibility break, but I more expect to find software with untested reliance on the documented behavior than software reliant on today's behavior. Back-patch to 9.1 (all supported versions). Reviewed by Tom Lane and Peter Eisentraut. Security: CVE-2016-5424
This commit is contained in:
parent
c9bb00fbd4
commit
db951dd195
@ -1605,6 +1605,7 @@ psql_scan_slash_option(PsqlScanState state,
|
|||||||
/* Keep the first quote, remove the second */
|
/* Keep the first quote, remove the second */
|
||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
inquotes = !inquotes;
|
inquotes = !inquotes;
|
||||||
/* Collapse out quote at *cp */
|
/* Collapse out quote at *cp */
|
||||||
memmove(cp, cp + 1, strlen(cp));
|
memmove(cp, cp + 1, strlen(cp));
|
||||||
|
Loading…
Reference in New Issue
Block a user