[PATCH] pgarchives: Always load auth, even when using PUBLIC_ARCHIVES=True

From: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
To: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] pgarchives: Always load auth, even when using PUBLIC_ARCHIVES=True
Date: 2023-04-01 21:38:26
Message-ID: bb55b32a-c744-d770-fb7e-4df090175a17@cmatte.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

There's an issue in pgarchives with auth when using PUBLIC_ARCHIVES=True.
Even in public archives mode, auth is necessary as an antispam feature for downloading mbox, raw messages etc.
However, in public archives mode, auth is not loaded, except when setting ALLOW_RESEND=True. But that variable has a different purpose and the semantics is unclear.
Several solutions exist:
- adding a variable in settings to allow auth for these purposes
- always loading auth. This is the solution I used in attached patch.
--
Célestin Matte

Attachment Content-Type Size
0001-Always-load-auth-even-when-using-PUBLIC_ARCHIVES-Tru.patch text/x-patch 3.1 KB

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Célestin Matte 2023-04-03 15:16:18 Re: [PATCH] pgarchives: pglister_sync: import lists with subscriber_access set to True
Previous Message Magnus Hagander 2023-03-31 14:43:01 Re: git.postgresql.org stuck?