Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1234 closed defect (fixed)

[patch] problems with multiple window logins, last_login not updated

Reported by: oggie rob <oz.robharvey@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I was making some changes to multiple windows of the admin interface, was prompted for a login as my session had expired, and promptly lost everything in my model! I was greeted with a nasty looking page complaining that none of the required fields were filled in, which indeed was true. In the process of debugging I discovered the last_login field was not being updated in admin. They are in the same method so this patch fixes both.

To reproduce the login failure:

  1. Add the missing change_stage staff_member_required thing (it's in magic_removal, but is needed to reproduce this problem): see [1830]
  2. turn on the admin interface on some model(s)
  3. set your myproj/ SESSION_COOKIE_AGE to something very low so you can set plenty of session expirations. I used 30 (meaning, 30 seconds). Log out and log in again to get the low cookie expiration.
  4. display a change list
  5. wait until the session expires
  6. use "open in new window" or "open in new tab" to have the edit view of several objects open in different windows. In other words, right-click on the href for those items in the change list. Each window will produce a login prompt.
  7. Try to log in on each of those edit views

The first screen should be fine, subsequent ones will return you to the edit screen with no fields displayed/selected and lots of errors. (You can use the back button to recover your work, however.) Minor variations on the above steps will lead to similar problems.

The problem is the POST has been encoded, and when it is used again of course the view function can't find the things it is looking for.

Attachments (1)

last_login_clear_pass.diff (1.7 KB) - added by oggie rob <oz.robharvey@…> 13 years ago.
fixes multiple window login problem and updates last_login

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by oggie rob <oz.robharvey@…>

Attachment: last_login_clear_pass.diff added

fixes multiple window login problem and updates last_login

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2010]) Fixed #1234 -- Fixed admin problem with login status getting out of sync with multiple windows/tabs. Thanks, oggie rob

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