Re: BUG #17032: wrong password cause double connect and double error - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: BUG #17032: wrong password cause double connect and double error
Date
Msg-id CAMkU=1y7va3iYKYtjs50FvfWE-frPjKzwQUm0-xf4jazf42tsw@mail.gmail.com
Whole thread Raw
In response to BUG #17032: wrong password cause double connect and double error  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17032: wrong password cause double connect and double error  (RekGRpth <rekgrpth@gmail.com>)
List pgsql-bugs
On Tue, May 25, 2021 at 7:55 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17032
Logged by:          RekGRpth
Email address:      rekgrpth@gmail.com
PostgreSQL version: 13.3
Operating system:   docker alpine
Description:       

1) create user test with password test and database test with owner test
2) add md5 auth for this user in pg_hba.conf like host test test
172.19.0.0/16 md5
3) compile test program src/postgres/src/test/examples/testlibpq.c
4) run test program with argument "host=postgres user=test password=wrong"
5) get double error on client side:

You have described the behavior, but not what about it is buggy.  This looks expected to me.

It tries to connect with encryption and fails, then tries to connect without encryption and also fails.

If you set sslmode to 'disable' or to 'require' (or higher) then you will only get one connection attempt.  But if it is 'allow' or 'prefer' (the default), then you will get two.

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Kämpf, Heiko (OWL-IT)
Date:
Subject: AW: BUG #16859: PostGIS 30 and 31 installation on SLES15 SP2 missing package SFCGAL or gmp
Next
From: RekGRpth
Date:
Subject: Re: BUG #17032: wrong password cause double connect and double error