Results 1 to 3 of 3

Thread: Multiple windows with one user

  1. #1
    Join Date
    Mar 2005
    Location
    Prague, Czech Republic
    Posts
    34

    Default Multiple windows with one user

    Now I now how to avoid the situation if a user wants to perform a second login. I would use ConcurrentSessionController. But does anyone know how to solve situation when user creates a new window (ie Ctrl+N) and it causes all session cookies to copy to this new window? What if I would like to prevent this thing and enable only one browser window per logged user.

    Thanks.
    Sorry if this is not related to Acegi Security

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    This is a client-side issue so I don't believe you can do anything about a user opening a second window unless you use Javascript or something. You could probably use some kind of URL-rewriting with a sequence number or token to detect the problem.

    In any case you will have to protect against them starting a new browser window in a different process, launching a different browser or logging on from a different machine. So you'll need to use ConcurrentSessionController too.

    Luke.

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

    Default

    That's a tricky requirement to satisfy. As Luke said, you'll need to do something fancy with URL rewriting or sequence numbers to make it work. Perhaps a Filter than sends a cookie containing the current URL they are looking at. Store that current URL in HttpSession. Upon the next request, ensure the current URL matches. Thus as soon as their second browser page deviates from the path of the first browser page, you'll be able to detect it. Don't forget to encode the cookie, a bit like we did in TokenBasedRememberMeServices, otherwise people can override your solution by modifying cookies on the client-side at each request. Unlikely, but possible.

Similar Threads

  1. Problem with HibernateInterceptor
    By prane in forum Data
    Replies: 5
    Last Post: Oct 16th, 2007, 08:01 AM
  2. LDAPPasswordAuthenticationDao problem
    By benoit_m35 in forum Security
    Replies: 15
    Last Post: Jan 11th, 2006, 07:04 AM
  3. Replies: 3
    Last Post: Sep 22nd, 2005, 10:14 AM
  4. Replies: 4
    Last Post: Jul 23rd, 2005, 05:54 AM
  5. Replies: 0
    Last Post: Nov 15th, 2004, 09:55 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
  •