librelist archives

« back to archive

Session deletion?

Session deletion?

From:
Neil Sheth
Date:
2015-03-11 @ 23:51
Hello,

Trying to figure out session deletion in Flask.  I'm looking at sessions.py:
https://github.com/mitsuhiko/flask/blob/master/flask/sessions.py

In the save_session function, I see (line 343):
if not session:
if session.modified:

If session isn't valid, how will it pass the session.modified check?

I'm actually trying to use the RedisSession snippet:
http://flask.pocoo.org/snippets/75/

I'm seeing that, on logout, it doesn't actually remove the session from
redis, nor does it delete the cookie.

Thoughts?

Thanks!

Re: Session deletion?

From:
Neil Sheth
Date:
2015-03-12 @ 01:52
Also, we're using Flask-Security / Flask-Login.  Tracing through, on the
logout call in our app, it actually doesn't look like it even enters the
"not session" code segment.  Any thoughts out there on this?

Thanks!

On Wed, Mar 11, 2015 at 4:51 PM, Neil Sheth <nsheth@gmail.com> wrote:

> Hello,
>
> Trying to figure out session deletion in Flask.  I'm looking at
> sessions.py:
> https://github.com/mitsuhiko/flask/blob/master/flask/sessions.py
>
> In the save_session function, I see (line 343):
> if not session:
> if session.modified:
>
> If session isn't valid, how will it pass the session.modified check?
>
> I'm actually trying to use the RedisSession snippet:
> http://flask.pocoo.org/snippets/75/
>
> I'm seeing that, on logout, it doesn't actually remove the session from
> redis, nor does it delete the cookie.
>
> Thoughts?
>
> Thanks!
>
>
>