cgi - secure sessions

Kirk McDonald mooquack at suad.org
Wed Feb 1 20:22:32 EST 2006


infini.g at gmail.com wrote:
> Hey,
> 
> I was just wondering if / how would it be possible to create secure
> sessions for a website using Python CGI... I thought of using cookies,
> and things looked promising for a while; I could login through a form
> which pointed to a cgi script which created sent the user cookies, but
> I found that when a script to detect the cookies was run through a
> server side include line in the html, it couldn't get any cookies, but
> it would work fine when run directly through the browser (which is
> useless to me).
> 
> If anybody could help with this it would be great. Python is the only
> programming language that I'm relatively comfortable in at the moment,
> so using the usual PHP or Javascript just isn't an option for me
> unfortunately.
> 
> GazaM
> 

For what it's worth, mod_python supports sessions:

http://www.modpython.org/live/current/doc-html/pyapi-sess.html

I've been playing with them recently, and they seem to work. :-)

-Kirk McDonald



More information about the Python-list mailing list