1. A method for transforming, by a security gateway, a message transmitted from a client to a server via the security gateway, the method comprising: receiving, by a security gateway, a message from a client transmitted to a server via a session, the message comprising a first data object; identifying, by a rule engine of the security gateway, a type of the message and a rule corresponding to the type of the message; recognizing, by the rule engine, that the first data object matches a pattern according to the rule; determining, by the rule engine, that the recognized first data object is not valid for the session according to the rule; modifying, by the security gateway according to the rule and in response to the determination, the message by one of disallowing, suppressing or transforming the first data object; and transmitting, by the security gateway, the modified message to the server.