Re: BUG #17032: wrong password cause double connect and double error

From: RekGRpth <rekgrpth(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17032: wrong password cause double connect and double error
Date: 2021-05-25 14:10:11
Message-ID: CAPgh2mLRKcKyS6s6bE+heMjgD8i2AOpN0W5=Ur4VSgN2i=zQCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ok, thanks. But, Why try to re-establish a known unsuccessful
connection? (because wrong password)

вт, 25 мая 2021 г. в 19:02, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:
>
> On Tue, May 25, 2021 at 7:55 AM PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
>>
>> The following bug has been logged on the website:
>>
>> Bug reference: 17032
>> Logged by: RekGRpth
>> Email address: rekgrpth(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-05-25 14:12:47 Re: BUG #17032: wrong password cause double connect and double error
Previous Message Jeff Janes 2021-05-25 14:02:11 Re: BUG #17032: wrong password cause double connect and double error