flask-session icon indicating copy to clipboard operation
flask-session copied to clipboard

Fixed error that can occur if document.get('expiration') returns None

Open ronsmith opened this issue 8 years ago • 1 comments

Not sure how my session got into this state but this change allows for a graceful recovery instead of an exception.

ronsmith avatar Sep 07 '17 17:09 ronsmith

A cleaner way would probably to add a default value to the get().

christopherpickering avatar May 11 '23 17:05 christopherpickering

This was likely from setting permanent to False which from 0.7.0 should no longer affect the serverside expiry. Previously some backends were not setting an expiry for non-permanent sessions, which has obvious implications for storage. All now do in accordance with PERMANENT_SESSION_LIFETIME. Anyone who really wants a non expiring session can just set this to a huge value.

Also mongo backend now uses time-to-live based on the expiry field

Lxstr avatar Feb 25 '24 05:02 Lxstr

No longer needed.

Lxstr avatar Mar 09 '24 21:03 Lxstr