Invalidating session in struts2

Obviously, one user being able to take over another user’s account is a . Any existing session information that needs to be retained is moved to temporary location 4. Check for session fixation if a user tries to use an existing session ID already in use from another IP address (requires maintaining this data in some type of map) 3.

The usual basic flow to handle session fixation prevention looks like: 1. Session is invalidated (Http Session#invalidate()) 5. If you notice these types of obvious malicious behavior, consider using something like to protect your app, and to be aware of the attack As you can see, session fixation is a serious issue, but has a pretty simple solution.

It has fundamental information about what a session is and how to manage it. Just to recap, session is a conversion between a server and a client.A session usually corresponds to one user, who may visit a site many times.The server can maintain a session in many ways such as using cookies or rewriting URLs. If it does, the servlet notifies the object that it has been bound to or unbound from the session.Seems that the session object relies on server for its GC.What happens when session.invalidate() is called: Both attributes and session object are destroyed immediately??? In fact it is the servlet container that creates the session object.Thus there will always be a session object present.

370

Leave a Reply