Skip to content
Snippets Groups Projects
Commit fed83cda authored by Noah Misch's avatar Noah Misch
Browse files

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
parent 682e172a
No related branches found
No related tags found
No related merge requests found
......@@ -1581,6 +1581,7 @@ psql_scan_slash_option(PsqlScanState state,
/* Keep the first quote, remove the second */
cp++;
}
else
inquotes = !inquotes;
/* Collapse out quote at *cp */
memmove(cp, cp + 1, strlen(cp));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment