#7776: Test cookie isn't deleted if persistent data in Newforms-Admin login
----------------------------------------+-----------------------------------
          Reporter:  Mnewman            |         Owner:  brosner           
            Status:  reopened           |     Milestone:  1.0               
         Component:  Admin interface    |       Version:  SVN               
        Resolution:                     |      Keywords:  Admin auth cookies
             Stage:  Ready for checkin  |     Has_patch:  1                 
        Needs_docs:  0                  |   Needs_tests:  0                 
Needs_better_patch:  0                  |  
----------------------------------------+-----------------------------------
Changes (by rajeshdhawan):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Russell: This still throws the error I mentioned above. Previously, I
 thought it was an intermittent problem but now I have been able to narrow
 it down to the case where an already logged in user is logging in to admin
 as a different user. In such a case, the `login` call on line 274 has the
 side effect of flushing/clearing out the session of the previously logged
 in user (as of [8343]). So, this empty session causes the
 `delete_test_cookie` call to fail with a KeyError.

 I think that the test cookie should only be deleted after checking
 `request.session.test_cookie_worked()` again. The `test_cookie_worked`
 call at line 244 is not sufficient.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7776#comment:8>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to