Results 1 to 4 of 4

Thread: Relogin fails.

  1. #1

    Default Relogin fails.

    Hi,
    I've recently started to use Acegi security to secure my application.
    Everything is going fine except that sometimes when I log off the application then relogin I'm not redirected to the correct page but I'm still redirected to the login page.
    The user name and password I provide are correct and no login failure occurs.
    It's just that the correct page is not opened.
    When I try to login again, it succeeds.
    I don't know why does this happen.
    Could anyone plz help me in that.

    Thanks in Advance.
    Sherihan.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Keep an eye on DEBUG-level logs and see if the same HttpSession ID is being used. Perhaps your container is not invalidating the HttpSession at logout. There is a bug in 0.8.0 (fixed in 0.8.1) related to handling of HttpSession invalidation and logouts. I've also seen people report problems like this when they're actually using BASIC authentication, which automatically re-presents credentials.

  3. #3

    Default

    Hi Ben,
    thanks for ur reply.
    But, I really don't know why should the container not invalidate the HttpSession at logout.
    In the logout jsp I invalidate the seeion using
    Code:
    <%session.invalidate&#40;&#41;;%>
    So, as I understand it shoul be invalidated.
    Am I mistaken in that?
    Thanks,
    Sherihan.

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    With 0.8.0, a problem was that the HttpSession was duly invalidated, but then the ContextHolder still contained an Authentication. During HttpSessionContextIntegrationFilter, it would then create a new HttpSession, and then copy the ContextHolder's Context into the new HttpSession. So in effect the item holding the Authentication token survived HttpSession invalidation - but only if you were not performing a redirect after the invalidation. It's fixed in 0.8.1.

Similar Threads

  1. Replies: 18
    Last Post: Nov 21st, 2008, 06:02 PM
  2. Replies: 1
    Last Post: Aug 18th, 2006, 11:04 PM
  3. Contacts example fails (kit 0.7.0)
    By rlbaldwin in forum Security
    Replies: 3
    Last Post: Feb 15th, 2005, 12:50 AM
  4. Stop validation if binding fails.
    By sherihan in forum Web
    Replies: 0
    Last Post: Feb 8th, 2005, 03:18 AM
  5. Replies: 1
    Last Post: Aug 20th, 2004, 11:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •