Opened 12 months ago

Closed 12 months ago

Last modified 11 months ago

#35013 closed Bug (invalid)

LogoutView from django.contrib.auth in Django 5.0 seems to use the wrong HTTP method

Reported by: dg Owned by: nobody
Component: HTTP handling Version: 5.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It seems to be sending a GET request, which leads to a 405 error, and no logout occurs, no loading of a custom logout template occurs.

Attachments (1)

Screenshot from 2023-12-05 00-57-25.png (71.2 KB ) - added by dg 12 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 by David Sanders, 12 months ago

Resolution: invalid
Status: newclosed

Hi,

Thanks for the report, though LogoutView does not accept GET requests – this is intentional :)

in reply to:  1 ; comment:2 by dg, 12 months ago

Replying to David Sanders:

Hi,

Thanks for the report, though LogoutView does not accept GET requests – this is intentional :)

I understand that, but I'm not sending a GET request. If I revert the Django version to 4.2, there is no error. It seems like something in Django 5 is sending the wrong request. I didn't change anything other than upgrading Django.

in reply to:  2 comment:3 by David Sanders, 12 months ago

I understand that, but I'm not sending a GET request. If I revert the Django version to 4.2, there is no error. It seems like something in Django 5 is sending the wrong request. I didn't change anything other than upgrading Django.

Sure, but we can't action anything based on this information unfortunately 🤷‍♂️ The best course of action is to determine what's sending the request, then if you find something concrete that indicates Django is at fault please feel free to provide more details here and reopen the ticket.

You can seek assistance from one of the Django support channels where there are many friendly people that can help you: https://www.djangoproject.com/community/

Lastly just to clarify the release notes for removed features (including logout via GET) are documented here: https://docs.djangoproject.com/en/5.0/releases/5.0/

Version 0, edited 12 months ago by David Sanders (next)

comment:4 by Natalia Bidart, 11 months ago

Severity: Release blockerNormal
Note: See TracTickets for help on using tickets.
Back to Top