rdmorganiser / rdmorganiser/rdmo

Django 5 compatibility bug in the logout flow (with Shibboleth)

Open
#1,723 0 comments 0 reactions 1 assignee View on GitHub

@MyPyDavid is already working on this.

Since Aug 27, 2026.

  • #1727 by @MyPyDavid — merged
Dominant language
Python
Stars
133
Forks
60
Avg merge
3d 14h
Merged PRs (30d)
21

Description

Description / Beschreibung

with help of ChatGPT

With Shibboleth as the only authentication backend and

LOGOUT_URL = '/account/shibboleth/logout/'

the logout results in:

GET /account/shibboleth/logout/
  -> 302 /account/logout/?next=/Shibboleth.sso/Logout

GET /account/logout/?next=/Shibboleth.sso/Logout
  -> 405 Method Not Allowed

shibboleth_logout() currently redirects to account_logout, which resolves to Django's LogoutView when django-allauth is disabled.

Since Django 5, LogoutView no longer supports logout via GET and requires POST, so the redirect results in a 405 response.

Expected behaviour / Erwartetes Verhalten

RDMO should first terminate the local Django session and then redirect to SHIBBOLETH_LOGOUT_URL, e.g.:

POST /account/shibboleth/logout/
  -> Django logout
  -> 302 /Shibboleth.sso/Logout

A possible fix would be for shibboleth_logout() to call django.contrib.auth.logout() directly and then redirect to SHIBBOLETH_LOGOUT_URL. The logout action in the navigation should use a POST form instead of a GET link.

This may also affect non-allauth installations in general, since the navigation uses a link to /account/logout/ while Django's LogoutView is POST-only.

Context / Kontext

Please state your operating system, the RDMO version, and (if applicable) the browser the error occurred in.

References / Verweise

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.