#9548: Cache Backend for Sessions doesn't handle Empty Session State
--------------------------------------+-------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  nobody    
   Status:  new                       |   Milestone:            
Component:  django.contrib.sessions   |     Version:  1.0       
 Keywords:                            |       Stage:  Unreviewed
Has_patch:  0                         |  
--------------------------------------+-------------------------------------
 The exists method in the SessionStore in the cache backend's test returns
 a session does not exist if nothing is stored in the session.  I'm am
 trying to develop a site that just uses the SessionMiddleware to track
 visitors and doesn't actually store anything in the session.  This will
 potential create collisions with existing visitors since exists() will
 return that the newly generated session key is available when it actually
 is not...

 Change from:
 {{{
     def exists(self, session_key):
         if self._cache.get(session_key):
             return True
         return False
 }}}

 To:
 {{{
     def exists(self, session_key):
         if self._cache.has_key(session_key):
             return True
         return False
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9548>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to