Code

Opened 2 years ago

#17975 new Cleanup/optimization

Make sessions more robust

Reported by: PaulM Owned by: nobody
Component: contrib.sessions Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In #17810, we fixed a specific problem where an invalid session cookie could result in a server error. Since this has the effect of locking a user out of an application permanently (the site just appears broken) until they clear their cookies, this is pretty undesirable.

This ticket is to improve and expand that protection. We should change the contract around sessions to be more robust. I suggest something along the lines of "if there is any kind of error during any operation related to a session, we log the problem and push a brand new session to the user."

This will mean that cases where an invalid session can exist (as in the previous ticket by an overly long session key, or one could imagine situations with broken pickled session data) don't wedge the user experience. We should (carefully) extend the protection added there to cover sessions more generally, including session creation, deletion, and access, across all backends. This will, of course, need to be balanced with providing useful error messages to developers.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.