Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28513 closed Bug (fixed)

LogoutView doesn't support POST, unlike the function-based logout() view

Reported by: Paulo Owned by: shangdahao
Component: contrib.auth Version: 1.11
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

The function-based logout() view allows using a POST request.

Because the new LogoutView introduced in 78963495d0caadb77eb97ccf319ef0ba3b204fb5 doesn't define a post() method, a POST request returns "405 Method not allowed". I don't think POST was officially supported (don't see it in the docs) but there's code in the view that checks for the redirect field in the POST data.

Change History (6)

comment:1 by Tim Graham, 7 years ago

Component: Uncategorizedcontrib.auth
Description: modified (diff)
Severity: NormalRelease blocker
Summary: django 1.11 doesn't support POST for logout viewLogoutView doesn't support POST, unlike the function-based logout() view
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

It seems reasonable to support that.

comment:2 by shangdahao, 7 years ago

Owner: changed from nobody to shangdahao
Status: newassigned

comment:3 by shangdahao, 7 years ago

Has patch: set
Last edited 7 years ago by shangdahao (previous) (diff)

comment:4 by Tim Graham, 7 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In c0f4c60e:

Fixed #28513 -- Added POST request support to LogoutView.

comment:6 by Tim Graham <timograham@…>, 7 years ago

In 58aaf13e:

[1.11.x] Fixed #28513 -- Added POST request support to LogoutView.

Backport of c0f4c60edd429f5ef57241cfabd159d13e26e5ac from master

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