public inbox for [email protected]  
help / color / mirror / Atom feed
From: Célestin Matte <[email protected]>
To: PostgreSQL WWW <[email protected]>
Subject: [PATCH 1/2] pgarchives: Add missing authentication backend to settings.py
Date: Thu, 28 Oct 2021 19:42:37 +0200
Message-ID: <[email protected]> (raw)

Hello,

Authentication when using private archives in pgarchives is broken with current settings.py file.
This first patch add a missing backend in settings.py, without which sessions aren't registered and users get redirected indefinitely.
In the second patch of this series, I add missing parameters for configuring PGAUTH, copying the ones from pglister.

Cheers,
-- 
Célestin Matte

Attachments:

  [text/x-patch] 0001-Add-missing-authentication-backend-to-settings.py.patch (838B, 2-0001-Add-missing-authentication-backend-to-settings.py.patch)
  download | inline diff:
From 8359ed3f27dfeecbd981be10fc07cd05804c08d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <[email protected]>
Date: Thu, 28 Oct 2021 19:26:27 +0200
Subject: [PATCH 1/2] Add missing authentication backend to settings.py

---
 django/archives/settings.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/django/archives/settings.py b/django/archives/settings.py
index 906d91b..db09575 100644
--- a/django/archives/settings.py
+++ b/django/archives/settings.py
@@ -161,6 +161,10 @@ if ALLOW_RESEND or not PUBLIC_ARCHIVES:
         'django.contrib.sessions',
     ] + INSTALLED_APPS
 
+    AUTHENTICATION_BACKENDS = (
+        'archives.auth.AuthBackend',
+    )
+
     if not PUBLIC_ARCHIVES:
         from archives.util import validate_new_user
         PGAUTH_CREATEUSER_CALLBACK = validate_new_user
-- 
2.33.1



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH 1/2] pgarchives: Add missing authentication backend to settings.py
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox