Re: [PATCH] pglister: auth_receive: Indicate when PGAUTH_KEY is invalid instead of crashing

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
Cc: pgsql-www(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pglister: auth_receive: Indicate when PGAUTH_KEY is invalid instead of crashing
Date: 2023-06-18 20:47:29
Message-ID: CABUevEyc_XzoUA7ML0pz37-AdR4vd16FzFeNxCtPb3=Wh3OFuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Mon, Feb 20, 2023 at 7:36 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me> wrote:
>
> Update: attached patched also catch ValueError exceptions, which can happen as well.
>
> Also attaching similar patch for pgarchives.
>
> As being confused by the lack of error message happened to me again, I think these patches are useful.

It seems a patch like this was already merged into the upstream of
this, and got deployed into pgarchives & pglister when I synced those
up a couple of weeks ago. Sorry about the lateness of that one. Does
the current version of the code work for what you were looking for?

It might also be worth considering also checking explicitly for the
format of PGAUTH_KEY on startup. Something like the attached maybe?
(against pgweb which is the master of this file) What do you think?

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

Attachment Content-Type Size
validate_pgauth.patch text/x-patch 661 bytes

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Palak Chaturvedi 2023-06-21 04:33:07 Editor access to wiki
Previous Message Magnus Hagander 2023-06-18 20:31:10 Re: pgarchives: Bug report + Patches: loader can't handle message in multiple lists