- Notifications
You must be signed in to change notification settings - Fork5
Commitb8b34b7
committed
When reading pg_hba.conf and similar files, do not treat@file as an inclusion
unless (1) the @ isn't quoted and (2) the filename isn't empty. This guardsagainst unexpectedly treating usernames or other strings in "flat files"as inclusion requests, as seen in a recent trouble report from Ed L.The empty-filename case would be guaranteed to misbehave anyway, because oursubsequent path-munging behavior results in trying to read the directorycontaining the current input file.I think this might finally explain the report athttp://archives.postgresql.org/pgsql-bugs/2004-05/msg00132.phpof a crash after printing "authentication file token too long, skipping",since I was able to duplicate that message (though not a crash) on aplatform where stdio doesn't refuse to read directories. We never gotfar in investigating that problem, but now I'm suspicious that the triggercondition was an @ in the flat password file.Back-patch to all active branches since the problem can be demonstrated in allbranches except HEAD. The test case, creating a user named "@", doesn't causea problem in HEAD since we got rid of the flat password file. Nonetheless itseems like a good idea to not consider quoted @ as a file inclusion spec,so I changed HEAD too.1 parent8eb8194 commitb8b34b7
1 file changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| |||
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
| 183 | + | |
| 184 | + | |
176 | 185 | | |
177 | 186 | | |
178 | 187 | | |
| |||
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
| 228 | + | |
219 | 229 | | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
224 | | - | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
235 | 245 | | |
236 | 246 | | |
237 | 247 | | |
238 | | - | |
| 248 | + | |
239 | 249 | | |
240 | 250 | | |
241 | 251 | | |
| |||
0 commit comments
Comments
(0)