Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 291

Show
Ignore:
Timestamp:
06/11/05 17:58:33
Author:
lawouach
Message:

Improved a bit the generateSessionKey routine

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/filter/sessionfilter/basesession.py

    r283 r291  
    9797            newKey = cherrypy._cputil.getSpecialAttribute(sessionKeyFunc)() 
    9898        else: 
    99             s = '' 
    100             for i in range(50): 
    101                 s += random.choice(string.letters+string.digits) 
    102             s += '%s'%time.time() 
     99            s = [random.choice(string.letters+string.digits) for i in xrange(50)] 
    103100            newKey = sha.sha(s).hexdigest() 
    104101         

Hosted by WebFaction

Log in as guest/cpguest to create tickets