forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0f679d2
committed
Reject, in pg_dumpall, names containing CR or LF.
These characters prematurely terminate Windows shell command processing,causing the shell to execute a prefix of the intended command. Thechief alternative to rejecting these characters was to bypass theWindows shell with CreateProcess(), but the ability to use such nameshas little value. Back-patch to 9.1 (all supported versions).This change formally revokes support for these characters in databasenames and roles names. Don't document this; the error message isself-explanatory, and too few users would benefit. A future majorrelease may forbid creation of databases and roles so named. For now,check only at known weak points in pg_dumpall. Future commits will,without notice, reject affected names from other frontend programs.Also extend the restriction to pg_dumpall --dbname=CONNSTR arguments and--file arguments. Unlike the effects on role name arguments anddatabase names, this does not reflect a broad policy change. Amigration to CreateProcess() could lift these two restrictions.Reviewed by Peter Eisentraut.Security:CVE-2016-54241 parent05abd3b commit0f679d2
1 file changed
+22
-0
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2117 | 2117 |
| |
2118 | 2118 |
| |
2119 | 2119 |
| |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
2120 | 2126 |
| |
2121 | 2127 |
| |
2122 | 2128 |
| |
| |||
2127 | 2133 |
| |
2128 | 2134 |
| |
2129 | 2135 |
| |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
2130 | 2144 |
| |
2131 | 2145 |
| |
2132 | 2146 |
| |
| |||
2138 | 2152 |
| |
2139 | 2153 |
| |
2140 | 2154 |
| |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
2141 | 2163 |
| |
2142 | 2164 |
| |
2143 | 2165 |
| |
|
0 commit comments
Comments
(0)