|
Status: Draft Weakness ID: 579 (Weakness Variant)Description Summary The application stores a non-serializable object as an HttpSession attribute, which can hurt reliability. Potential Mitigations In order for session replication to work, the values the application stores as attributes in the session must implement the Serializable interface. Demonstrative Examples The following class adds itself to the session, but because it is not serializable, the session can no longer be replicated. public class DataGlob { String globName; String globValue; public void addToSession(HttpSession session) { session.setAttribute("glob", this); } }
Other Notes A J2EE application can make use of multiple JVMs in order to improve application reliability and performance. In order to make the multiple JVMs appear as a single application to the end user, the J2EE container can replicate an HttpSession object across multiple JVMs so that if one JVM becomes unavailable another can step in and take its place without disrupting the flow of the application. Relationships
Applicable Platforms Languages Java Time of Introduction Architecture and Design ImplementationContent History Modifications Eric Dalci. Cigital. 2008-07-01. (External) updated Time_of_Introduction CWE Content Team. MITRE. 2008-09-08. (Internal) updated Relationships, Other_Notes |
|
|
|||