Original Post
I have an Account class that which holds authentication information for a specific account. The class is meant to be a base class, and defines two methods, Serialize() and Deserialize(). Derived classes override DoSerialize() and DoSerialize() (as the base class has some housekeeping to do). Right now, Serialize() and Deserialize() take in a TiXmlElement pointer (Tiny XML) that points to the root XML node that [de]serialization begins at.
The problem is the derived class has to store its password sometime (connection could be severed and reconnection needed - shouldn''t prompt the user again!), and some evil code could simply serialize the account out to another file, read that file in, grab the password, and send it out to the master of darkness or whatever. Now, I''m aware of the fact that no matter what I do someone can pretty easily figure out object layout and do enough pointer arithmetic to get to the actual data. However this particular case strikes me as glaringly easy to exploit.
And if you''re wondering why I worry about evil code, its because the application is meant to be extended by users, it is completely component based. I want people mixing plugins until they find the right set of UI''s and features for their uses.