pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix fallback behavior when server sends an ERROR early at startu
Date: Fri, 26 Jul 2024 12:38:54 +0000
Message-ID: <E1sXKDm-001IyB-1Y@gemulon.postgresql.org> (raw)

Fix fallback behavior when server sends an ERROR early at startup

With sslmode=prefer, the desired behavior is to completely fail the
connection attempt, *not* fall back to a plaintext connection, if the
server responds to the SSLRequest with an error ('E') response instead
of rejecting SSL with an 'N' response. This was broken in commit
05fd30c0e7.

Reported-by: Jacob Champion
Reviewed-by: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAOYmi%2Bnwvu21mJ4DYKUa98HdfM_KZJi7B1MhyXtnsyOO-PB6Ww%40mail.g...
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f06a632a77ed27aab087d62bd76bc52be3a2ac6f

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)



view thread (2+ messages)

Message-ID: <E1sXKDm-001IyB-1Y@gemulon.postgresql.org>
Permalink:  ../E1sXKDm-001IyB-1Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sXKDm-001IyB-1Y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix fallback behavior when server sends an ERROR early at startu
  In-Reply-To: <E1sXKDm-001IyB-1Y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox