public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jack Bonatakis <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: [email protected]
Subject: Re: Unable to log out of postgresql.org
Date: Thu, 19 Mar 2026 19:49:21 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Hi Daniel,

Thanks for confirming. I took a look at the repo and have a fix that works locally. Please see the attached patch.

Jack

On Thu, Mar 19, 2026, at 6:21 PM, Daniel Gustafsson wrote:
> > On 19 Mar 2026, at 23:15, Jack Bonatakis <[email protected]> wrote:
> 
> > I seem unable to log out of postgresql.org. I have tried in multiple browsers and have received the same error each time.
> 
> I can reproduce that as well.
> 
> --
> Daniel Gustafsson
> 
> 


Attachments:

  [application/octet-stream] 0001-Render-logout-as-a-POST-form.patch (2.4K, ../[email protected]/3-0001-Render-logout-as-a-POST-form.patch)
  download | inline diff:
From 639c12e7a8b37707da96a46ea8c5d290590942e5 Mon Sep 17 00:00:00 2001
From: Jack Bonatakis <[email protected]>
Date: Thu, 19 Mar 2026 19:43:53 -0400
Subject: [PATCH] Render logout as a POST form

In order to make the logout link send a POST
we have to render it as a button. This does
that, and styles it to match the existing
links in the sidebar
---
 media/css/main.css       | 15 +++++++++++++++
 pgweb/util/contexts.py   |  2 +-
 templates/base/page.html | 10 +++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/media/css/main.css b/media/css/main.css
index 6aed61e0..b6f0ee79 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -848,6 +848,21 @@ input#navbar-toggler {
   font-weight: normal;
 }
 
+#pgSideNav .pg-nav-button {
+  background: none;
+  border: 0;
+  color: var(--pg-sidenav-a-fg-color);
+  cursor: pointer;
+  font: inherit;
+  font-weight: normal;
+  padding: 0;
+}
+
+#pgSideNav .pg-nav-button:hover,
+#pgSideNav .pg-nav-button:active {
+  color: var(--a-highlight-fg-color);
+}
+
 #pgSideNav ul {
   list-style-type: circle;
   padding-left: 1.3em;
diff --git a/pgweb/util/contexts.py b/pgweb/util/contexts.py
index 412b7b61..189bea59 100644
--- a/pgweb/util/contexts.py
+++ b/pgweb/util/contexts.py
@@ -87,7 +87,7 @@ sitenav = {
             {'title': 'Organisations', 'link': '/account/edit/organisations/'},
         ]},
         {'title': 'Change password', 'link': '/account/changepwd/'},
-        {'title': 'Logout', 'link': '/account/logout/'},
+        {'title': 'Logout', 'link': '/account/logout/', 'post': True},
     ],
 }
 
diff --git a/templates/base/page.html b/templates/base/page.html
index 523b53d8..0548912d 100644
--- a/templates/base/page.html
+++ b/templates/base/page.html
@@ -11,7 +11,15 @@
          <ul>
            {%for m in navmenu%}
            {%if not forloop.first %}</li>{%endif%}
-           <li{%if forloop.last%} class="last-child"{%endif%}><a href="{{m.link}}">{{m.title}}</a>
+           <li{%if forloop.last%} class="last-child"{%endif%}>
+            {% if m.post %}
+            <form method="post" action="{{m.link}}">
+              {% csrf_token %}
+              <button type="submit" class="pg-nav-button">{{m.title}}</button>
+            </form>
+            {% else %}
+            <a href="{{m.link}}">{{m.title}}</a>
+            {% endif %}
             {%if m.submenu %}
              <ul>
              {%for sm in m.submenu %}
-- 
2.50.1 (Apple Git-155)



view thread (6+ messages)  latest in thread

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], [email protected]
  Subject: Re: Unable to log out of postgresql.org
  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