git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: a160423) | patch
Re-validate connection string in libpqrcv_connect().
2024年1月12日 21:41:36 +0000 (13:41 -0800)
2024年1月12日 21:41:36 +0000 (13:41 -0800)
commit 5c31669058b5550b4b3d623c07bc4203c11b8316
Re-validate connection string in libpqrcv_connect().

A superuser may create a subscription with password_required=true, but
which uses a connection string without a password.

Previously, if the owner of such a subscription was changed to a
non-superuser, the non-superuser was able to utilize a password from
another source (like a password file or the PGPASSWORD environment
variable), which should not have been allowed.

This commit adds a step to re-validate the connection string before
connecting.

Reported-by: Jeff Davis
Author: Vignesh C
Reviewed-by: Peter Smith, Robert Haas, Amit Kapila
Discussion: https://www.postgresql.org/message-id/flat/e5892973ae2a80a1a3e0266806640dae3c428100.camel%40j-davis.com
Backpatch-through: 16
doc/src/sgml/ref/create_subscription.sgml diff | blob | blame | history
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c diff | blob | blame | history
src/test/subscription/t/027_nosuperuser.pl diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /