diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2006-01-07 11:07:52 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2006-01-07 11:07:52 +0000 |
| commit | 8d307fb8f7ce38c565ffb8061217ff6f3fd69b21 (patch) | |
| tree | aeb5c1f15d98f9cbd2e9f314e93841e36443a3f8 | |
| parent | 2bffee2e6c3744705acf05710150b73afb315bf9 (diff) | |
fixes #1180 - added another random number to the get_new_session_key function to prevent early duplicates
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/models/core.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/models/core.py b/django/models/core.py index 17519b53d8..f78f23f265 100644 --- a/django/models/core.py +++ b/django/models/core.py @@ -105,7 +105,7 @@ class Session(meta.Model): # The random module is seeded when this Apache child is created. # Use person_id and SECRET_KEY as added salt. while 1: - session_key = md5.new(str(random.randint(0, sys.maxint - 1)) + SECRET_KEY).hexdigest() + session_key = md5.new(str(random.randint(0, sys.maxint - 1)) + str(random.randint(0, sys.maxint - 1)) + SECRET_KEY).hexdigest() try: get_object(session_key__exact=session_key) except SessionDoesNotExist: |
