diff options
| author | Noah Misch | 2016-08-08 14:07:46 +0000 |
|---|---|---|
| committer | Noah Misch | 2016-08-08 14:07:51 +0000 |
| commit | a44d713512222a519701b7f5ad2634dc3a8fc24b (patch) | |
| tree | 5f0b2369e1c096d5f1966aaed258aead37d97a8a /src | |
| parent | 56e410c86d510eb64aa160f5c39e1a543be5c7f7 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/psql/psqlscan.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/psqlscan.l b/src/bin/psql/psqlscan.l index 20ffa3ab5b6..cc454949baf 100644 --- a/src/bin/psql/psqlscan.l +++ b/src/bin/psql/psqlscan.l @@ -1581,7 +1581,8 @@ psql_scan_slash_option(PsqlScanState state, /* Keep the first quote, remove the second */ cp++; } - inquotes = !inquotes; + else + inquotes = !inquotes; /* Collapse out quote at *cp */ memmove(cp, cp + 1, strlen(cp)); mybuf.len--; |
