Index: lams_common/src/java/org/lamsfoundation/lams/web/session/SessionManager.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/web/session/SessionManager.java,v diff -u -r1.17 -r1.18 --- lams_common/src/java/org/lamsfoundation/lams/web/session/SessionManager.java 10 Nov 2009 04:20:13 -0000 1.17 +++ lams_common/src/java/org/lamsfoundation/lams/web/session/SessionManager.java 18 Nov 2009 01:06:16 -0000 1.18 @@ -196,6 +196,16 @@ ssoCookie = createCookie((HttpServletResponse) res, SystemSessionFilter.SSO_SESSION_COOKIE, currentSessionId); SessionManager.log.debug("==>Creating new " + SystemSessionFilter.SSO_SESSION_COOKIE + " - " + ssoCookie.getValue()); } + + Cookie cookie = findCookie((HttpServletRequest) req, SystemSessionFilter.SYS_SESSION_COOKIE); + if (cookie == null) { + // If a session exists in the request without a corresponding JSESSIONID cookie, assume + // user lost their cookie or closed their browser, so invalidate the session + HttpSession session = ((HttpServletRequest)req).getSession(false); + if (session != null) { + session.invalidate(); + } + } setCurrentSessionId(currentSessionId); // reset session last access time