Changes between Initial Version and Version 1 of Ticket #10253
- Timestamp:
- Feb 12, 2009, 7:16:02 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10253 – Description
initial v1 1 1 Related to changeset 8340. 2 2 {{{ 3 3 # Use the system (hardware-based) random number generator if it exists. 4 4 if hasattr(random, 'SystemRandom'): … … 7 7 randrange = random.randrange 8 8 MAX_SESSION_KEY = 18446744073709551616L # 2 << 63 9 9 }}} 10 10 11 11 Platform info: 12 {{{ 12 13 >>> platform.system() 13 14 'SunOS' … … 18 19 >>> platform.python_version() 19 20 '2.5.2' 20 21 }}} 21 22 Condition in line 17 of base.py, "if hasattr(random, 'SystemRandom'):", evaluates to True, but randrange fails. 22 23 {{{ 23 24 >>> hasattr(random, 'SystemRandom') 24 25 True … … 37 38 raise NotImplementedError("/dev/urandom (or equivalent) not found") 38 39 NotImplementedError: /dev/urandom (or equivalent) not found 39 40 }}} 40 41 Exception occurs at when attempting to generate a new session key (when trying to access admin). 41 42 {{{ 42 43 File "/django/contrib/sessions/backends/base.py", line 142, in _get_new_session_key % (randrange(0, MAX_SESSION_KEY), pid, time.time(), 43 44 45 }}} 44 46 45 47 46