[Tutor] Difference between SimpleCookie and SmartCookie

Kent Johnson kent37 at tds.net
Tue Mar 24 16:20:44 CET 2009


On Tue, Mar 24, 2009 at 10:33 AM, Kumar <hihiren1 at gmail.com> wrote:
> I just came to know about this classes SimpleCookie and SmartCookie.
> I could get that usage. But I didn't get the difference between these
> classes?
> Can anybody please tell me what is the difference between this classes?

SmartCookie allows cookies to include objects other than strings. It
uses the pickle module to serialize and deserialize the objects.

You should never unpickle untrusted objects, it is a security hole.
For this reason SmartCookie is not recommended and it is deprecated.

Kent


More information about the Tutor mailing list