Commits

Sylvain Hellegouarch committed f7808be

Improved a bit the generateSessionKey routine

Comments (0)

Files changed (1)

cherrypy/lib/filter/sessionfilter/basesession.py

         if sessionKeyFunc:
             newKey = cherrypy._cputil.getSpecialAttribute(sessionKeyFunc)()
         else:
-            s = ''
-            for i in range(50):
-                s += random.choice(string.letters+string.digits)
-            s += '%s'%time.time()
+            s = [random.choice(string.letters+string.digits) for i in xrange(50)]
             newKey = sha.sha(s).hexdigest()
         
         return newKey