[Zope] Session Invalidate doesn't work

Vitor Varalonga vpedrosa@ciberbit.pt
Tue, 01 Oct 2002 14:58:19 +0100


--------------9B6A613372441AEAE1AF78DF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

    Hi!


    Within my Zope web site, I've included a logout functionality that
is supposed to log the user out of the system, redirecting him to the
login page. So far so good, but the script I call to perform the whole
logout process besides redirecting to the login page, also ends
(or should end) the session.
    The code I used to "end" the session was the following:

        container.session_data_manager.getSessionData().invalidate()

    I even tried the following instead:

        SESSION.invalidate()
        SESSION.getBrowserIdManager().flushBrowserIdCookie()

    And what happens is that although the logout process seems to
work fine (the SESSION variables no longer exist), the transient
container for the session data, instead of decreasing or at least
maintaining the number of items, increases it!!!
    Any suggestion/solution?


kind regards,

Vitor Varalonga

--------------9B6A613372441AEAE1AF78DF
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>&nbsp;&nbsp;&nbsp; Hi!</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp; Within my Zope web site, I've included a logout
functionality that</tt>
<br><tt>is supposed to log the user out of the system, redirecting him
to the</tt>
<br><tt>login page. So far so good, but the script I call to perform the
whole</tt>
<br><tt>logout process besides redirecting to the login page, also ends</tt>
<br><tt>(or should end) the session.</tt>
<br><tt>&nbsp;&nbsp;&nbsp; The code I used to "end" the session was the
following:</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; container.session_data_manager.getSessionData().invalidate()</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp; I even tried the following instead:</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SESSION.invalidate()</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SESSION.getBrowserIdManager().flushBrowserIdCookie()</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp; And what happens is that although the logout
process seems to</tt>
<br><tt>work fine (the SESSION variables no longer exist), the transient</tt>
<br><tt>container for the session data, instead of decreasing or at least</tt>
<br><tt>maintaining the number of items, increases it!!!</tt>
<br><tt>&nbsp;&nbsp;&nbsp; Any suggestion/solution?</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>kind regards,</tt><tt></tt>
<p><tt>Vitor Varalonga</tt></html>

--------------9B6A613372441AEAE1AF78DF--