pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ytourki@ext.scaleway.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication
Date: Thu, 07 Sep 2023 13:17:33 -0400
Message-ID: <1722734.1694107053@sss.pgh.pa.us> (raw)
In-Reply-To: <18095-1efc746f742f766c@postgresql.org>
References: <18095-1efc746f742f766c@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> When connecting to a PostgreSQL server (version 14) configured to only
> accept SSL connections, if a user provides an incorrect password, the psql
> client (version 14) returns two error messages in succession. The first
> message correctly indicates a password authentication failure, but the
> second suggests an unexpected non-SSL connection attempt.

This is libpq's (not psql's) default behavior.  If you don't like it,
you need to set the sslmode parameter in the connection string to prevent
non-SSL connection attempts.  See

https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <1722734.1694107053@sss.pgh.pa.us>
Permalink:  ../1722734.1694107053@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1722734.1694107053@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ytourki@ext.scaleway.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication
  In-Reply-To: <1722734.1694107053@sss.pgh.pa.us>

* 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