ok I see on issue that I can resolve in the sessions code
os.environ['REMOTE_ADDR'] is used for session token creation, and it
appears that in some cases this is set to a null value. I'm seeing
these sessions in the demo on the live site, so will address this as
soon as I can, more than likely pulling that field out of the
generation of that value. It isn't necessary now that it's using the
key value of the session entity to create the token.
I'm not sure when I'll get a chance to fix this in the library itself,
but here's the fix I'll try first.
Around line 308 is the method:
def new_sid(self):
"""
Create a new session id.
"""
sid = str(self.session.key()) +
md5.new(repr(time.time()) + \
os.environ['REMOTE_ADDR'] + \
str(random.random())).hexdigest()
return sid
I would change this to
def new_sid(self):
"""
Create a new session id.
"""
sid = str(self.session.key()) +
md5.new(repr(time.time()) + \
str(random.random())).hexdigest()
return sid
It's interesting that the os.environ['REMOTE_ADDR'] field isn't always
getting populated with the users IP, so that's something I'll have to
look into as well.