Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit db951dd

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 c9bb00f commit db951dd

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
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,8 @@ psql_scan_slash_option(PsqlScanState state,
16051605
/* Keep the first quote, remove the second */
16061606
cp++;
16071607
}
1608-
inquotes = !inquotes;
1608+
else
1609+
inquotes = !inquotes;
16091610
/* Collapse out quote at *cp */
16101611
memmove(cp, cp + 1, strlen(cp));
16111612
mybuf.len--;

0 commit comments

Comments
 (0)