Uploaded image for project: 'i2b2 Core Software'
  1. i2b2 Core Software
  2. CORE-28

i2b2 sessions never update

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.00
    • 1.6.00
    • PM Cell
    • None
    • Rank:
      0|i00173:
    • Session Timeout

    Description

      During an effort to propagate login/logout events to a central logging service, I discovered
      that updateSession() has the user_id and session_id SQL parameters in the wrong
      order, so it never updates any records.

      Once the session timeout bug (http://community.i2b2.org/jira/browse/LEOPARD-39 )
      was fixed, this meant that sessions could never last more than 30 minutes, I think.

      The fix is straightforward:

      --- a/edu.harvard.i2b2.pm/src/edu/harvard/i2b2/pm/dao/PMDbDao.java
      +++ b/edu.harvard.i2b2.pm/src/edu/harvard/i2b2/pm/dao/PMDbDao.java
      @@ -707,7 +707,7 @@ public class PMDbDao extends JdbcDaoSupp
        public int updateSession(String userId, String sessionId, int timeout)
        {
        String addSql = "update pm_user_session set expired_date = ? " +
      - " where session_id = ? and user_id =?";
      + " where user_id = ? and session_id =?";
        Calendar now = Calendar.getInstance();
        now.add(Calendar.MILLISECOND, timeout);

      I checked the current svn code (Rev: 62 2010-07-28 13:39:58 -0500) and the bug
      is still there.

      see also http://bitbucket.org/DanC/i2b2-pm-cas/changeset/a8c7cd30b279

      Attachments

        Activity

          People

            mem61 Mike Mendis
            dconnolly Dan Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: