Changes between Initial Version and Version 1 of Ticket #10253


Ignore:
Timestamp:
Feb 12, 2009, 7:16:02 PM (16 years ago)
Author:
Alex Gaynor
Comment:

Please use the preview button folks.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10253 – Description

    initial v1  
    11Related to changeset 8340.
    2 
     2{{{
    33# Use the system (hardware-based) random number generator if it exists.
    44if hasattr(random, 'SystemRandom'):
     
    77    randrange = random.randrange
    88MAX_SESSION_KEY = 18446744073709551616L     # 2 << 63
    9 
     9}}}
    1010
    1111Platform info:
     12{{{
    1213>>> platform.system()
    1314'SunOS'
     
    1819>>> platform.python_version()
    1920'2.5.2'
    20 
     21}}}
    2122Condition in line 17 of base.py, "if hasattr(random, 'SystemRandom'):", evaluates to True, but randrange fails.
    22 
     23{{{
    2324>>> hasattr(random, 'SystemRandom')
    2425True
     
    3738    raise NotImplementedError("/dev/urandom (or equivalent) not found")
    3839NotImplementedError: /dev/urandom (or equivalent) not found
    39 
     40}}}
    4041Exception occurs at when attempting to generate a new session key (when trying to access admin).
    41 
     42{{{
    4243File "/django/contrib/sessions/backends/base.py", line 142, in _get_new_session_key % (randrange(0, MAX_SESSION_KEY), pid, time.time(),
    4344
     45}}}
    4446
    4547
    46 
Back to Top