Opened 16 years ago
Closed 15 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: | no | UI/UX: | no |
Description
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.