pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
507 stars 238 forks source link

Error when expiry is null #151

Closed haflidi closed 9 months ago

haflidi commented 1 year ago

Using SQLALCHEMY with postgresql. One client written in angular deleted the session cookie when logout. When this happended a new entry in the session table had an expiry with null value. This caused an error in line 535 in the sessions.py file. It's very easy to fix this error. I changed the if statement in line 535 to: if saved_session and (saved_session.expiry is None or saved_session.expiry <= datetime.utcnow()): It would be very nice If you could correct this error in next release of flask-session

Lxstr commented 9 months ago

Should now be fixed thanks