#24465: Failed logins are recorded as HTTP 200 instead of HTTP 403
-------------------------------+--------------------------------------
     Reporter:  marklit        |                    Owner:  nobody
         Type:  Bug            |                   Status:  closed
    Component:  contrib.admin  |                  Version:  1.7
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by erikr):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I can see your point, but the behaviour is correct and intentional. The
 200 response means the same form is re-rendered, now including an error
 message. The user can edit their input and try again. A 403 response would
 cause the browser to display a much less friendly error, without offering
 a reasonable way for a user to correct their error.

 Basically, login errors are handled the same way as any other form error,
 in the typical case: return a 200 response, display the form again,
 prefilled with any non-secret data the user already entered, and the
 appropriate error message. The user adjusts their input and submits the
 form again.

--
Ticket URL: <https://code.djangoproject.com/ticket/24465#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/065.207e0018e24b62b1a64191255809420c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to