forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4c03ac7
committed
Re-validate connection string in libpqrcv_connect().
A superuser may create a subscription with password_required=true, butwhich uses a connection string without a password.Previously, if the owner of such a subscription was changed to anon-superuser, the non-superuser was able to utilize a password fromanother source (like a password file or the PGPASSWORD environmentvariable), which should not have been allowed.This commit adds a step to re-validate the connection string beforeconnecting.Reported-by: Jeff DavisAuthor: Vignesh CReviewed-by: Peter Smith, Robert Haas, Amit KapilaDiscussion:https://www.postgresql.org/message-id/flat/e5892973ae2a80a1a3e0266806640dae3c428100.camel%40j-davis.comBackpatch-through: 161 parent9c00e4c commit4c03ac7
File tree
3 files changed
+95
-5
lines changed- doc/src/sgml/ref
- src
- backend/replication/libpqwalreceiver
- test/subscription/t
3 files changed
+95
-5
lines changedLines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
364 |
| - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
365 | 366 |
| |
366 | 367 |
| |
367 | 368 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
140 | 149 |
| |
141 | 150 |
| |
142 | 151 |
| |
|
Lines changed: 80 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
306 | 386 |
|
0 commit comments
Comments
(0)