Best way to handle cgi sessions

Christoph Haas email at christoph-haas.de
Fri Oct 14 18:28:32 EDT 2005


On Friday 14 October 2005 21:22, Derek Perriero wrote:
> What would be the best way to create a cgi session that contains the
> basic elements of a cookie and can also hold secure data, such as a
> username/password. [...]

Said. Done. I just tidied up a module we will be using for a web site
here. It uses the promised session-cookie handling (with a lot of security
checks) and a MySQL database backend. I tried to document as well as 
possible
so I hope it will even help you if you use it or not. To try it out just
grab the two files from http://workaround.org/pysessions/ and copy them 
into a
cgi-bin/ directory. Create a database and the two tables following the
scheme described on top of the MySessions.py module. Then access the
/cgi-bin/mypage CGI. Hope to have helped.

Everyone:
This is my first "bigger" Python script. I would really like to hear 
comments
on it. If it's deemed to be decent I could use some help making it a 
package
that can be used by others as well. There is probably a bit of perlishness
that I'd like to get rid of to make it look more snake-like.

Regards
 Christoph
-- 
~
~
".signature" [Modified] 1 line --100%--                1,48         All




More information about the Python-list mailing list