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: