Commits

Robert Brewer committed 6a4ab80

Faster sessionID generator.

  • Participants
  • Parent commits e505273
  • Branches cherrypy

Comments (0)

Files changed (1)

File lib/filter/sessionfilter.py

         cpg.response.simpleCookie[cookieName]['version'] = 1
 
 def generateSessionId():
-    s = ''.join([random.choice(alphanum) for i in xrange(50)])
-    s += '%s' % time.time()
+    s = "%s%s" % (random.random(), time.time())
     return sha.sha(s).hexdigest()
 
 def cleanupSessionData():