#28513: LogoutView doesn't support POST, unlike the function-based logout() view
---------------------------------+------------------------------------
     Reporter:  Paulo            |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.auth     |                  Version:  1.11
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by Tim Graham):

 * component:  Uncategorized => contrib.auth
 * stage:  Unreviewed => Accepted
 * type:  Uncategorized => Bug
 * severity:  Normal => Release blocker


Old description:

> Hello,
>
> On Django versions < 1.11, the logout view allowed us to use a POST
> request.
>
> Because no ''post'' method is defined on the new ''LogoutView''
> introduced in
> https://github.com/django/django/commit/78963495d0caadb77eb97ccf319ef0ba3b204fb5,
> a POST request will raise 405 Method not allowed error. 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.

New description:

 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.

--

Comment:

 It seems reasonable to support that.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28513#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5829962234209a90fa8131e289e6e972%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to