Opened 5 years ago

Closed 4 years ago

#11171 closed (worksforme)

custom set_exipy is ignored server side when set to 0

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


According to the docs, setting the request.session.set_expiry() function to a custom value of 0 should set the cookie to only expire at browser close. It does, in fact set the local cookie's expiry time to blank, however the session middleware (or maybe it is the session app itself), still logs out the user after the global cookie age has passed, effectively ignoring the custom parameter I set. Using a datetime in the future or a value for seconds higher than 0 works just fine. Just not the explicit 0 value.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

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

Note: See TracTickets for help on using tickets.