pallets-eco / flask-session

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

Session.expiry doesn't check for none #204

Closed armurox closed 5 months ago

armurox commented 6 months ago

I noticed that in sessions.py, in line 557, the code read: if saved_session and saved_session.expiry <= datetime.utcnow():, which was causing issues when the flask session saved in the database was NULL (the line does not check for this case). This was affecting my ability to use sessions in supabase, so I have now changed the code to: if saved_session and saved_session.expiry and saved_session.expiry <= datetime.utcnow():. I have opened a pull request with this change, just wanted to make sure that I have gone about it the right way.

Lxstr commented 5 months ago

This one should now be fixed. Let me know if not

armurox commented 5 months ago

This one should now be fixed. Let me know if not

@Lxstr yes, confirmed