8000 Sort out paired double quotes in \connect, \password and \crosstabview. · s-monk/postgres@fed83cd · GitHub
[go: up one dir, main page]

Skip to content

Commit fed83cd

Browse files
committed
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
1 parent 682e172 commit fed83cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/psql/psqlscan.l

Lines changed: 2 additions & 1 deletion
4D4A
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,8 @@ psql_scan_slash_option(PsqlScanState state,
15811581
/* Keep the first quote, remove the second */
15821582
cp++;
15831583
}
1584-
inquotes = !inquotes;
1584+
else
1585+
inquotes = !inquotes;
15851586
/* Collapse out quote at *cp */
15861587
memmove(cp, cp + 1, strlen(cp));
15871588
mybuf.len--;

0 commit comments

Comments
 (0)
0