Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-399

Memory leak for invalid sessions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.2.2
    • None

    Description

      Have a session and wait till gets invalidated via logout/expiration.
      In a SessionListener implementation for the session the client code can try to clean-up the session (what I originally did: session.removeAttributes() but doing so throws an InvalidSessionException because the session is already invalidated by the time it reaches the listener)
      This unexpected exception alters the normal flow, hence the code that should delete the session never gets executed, hence the invalidated session data hangs forever either in memory or other storage.

      This can be avoided with well behaved client code-which knows that it shouldn't try to clean an expired session, but it should be also handled on your side as well and to enclose some code in try/finally blocks.

      Attachments

        1. patch.txt
          5 kB
          Bogdan Flueras

        Activity

          People

            Unassigned Unassigned
            bflueras Bogdan Flueras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: