Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 2244:ac4f295499a4
fixed journal marshalling in RDBMS backends [SF#943627]
fixed handling of key values starting with numbers [SF#941363]
fixed journal "param" column size in RDBMS backends
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 02 May 2004 23:16:05 +0000 |
| parents | f624fc20f8fe |
| children | 9db7d2842222 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Sat May 01 08:19:00 2004 +0000 +++ b/roundup/cgi/client.py Sun May 02 23:16:05 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.173 2004-04-25 22:19:15 richard Exp $ +# $Id: client.py,v 1.174 2004-05-02 23:16:05 richard Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -624,13 +624,13 @@ """ sessions = self.db.getSessionManager() - # generate a session key - s = '%s%s'%(time.time(), random.random()) - print s - self.session = binascii.b2a_base64(s).strip() - while sessions.exists(self.session): + # generate a unique session key + while 1: s = '%s%s'%(time.time(), random.random()) - self.session = binascii.b2a_base64(s).strip() + s = binascii.b2a_base64(s).strip() + if not sessions.exists(s): + break + self.session = s # clean up the base64 if self.session[-1] == '=':
