diff options
author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-14 19:43:08 +0000 |
---|---|---|
committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-08-14 19:43:08 +0000 |
commit | 9e423b51e325c9226e2f744bfa52336a626bf63a (patch) | |
tree | 5cd7afed4caf64dfd64d2dada7dd58fdec937074 /django/contrib/sessions/backends/cache.py | |
parent | 9b66eae75f037c5f22eb94b33a8328015d0ec9c2 (diff) | |
download | django-9e423b51e325c9226e2f744bfa52336a626bf63a.tar.gz |
Fixed #8314 -- Fixed an infinite loop caused when submitting a session key (via
a cookie) with no corresponding entry in the database.
This only affected the database backend, but I've applied the same fix to all
three backends for robustness.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/sessions/backends/cache.py')
-rw-r--r-- | django/contrib/sessions/backends/cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/sessions/backends/cache.py b/django/contrib/sessions/backends/cache.py index 2988d3ee09..157d18a586 100644 --- a/django/contrib/sessions/backends/cache.py +++ b/django/contrib/sessions/backends/cache.py @@ -30,7 +30,8 @@ class SessionStore(SessionBase): func = self._cache.add else: func = self._cache.set - result = func(self.session_key, self._session, self.get_expiry_age()) + result = func(self.session_key, self._get_session(no_load=must_create), + self.get_expiry_age()) if must_create and not result: raise CreateError |