Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/contrib/sessions/backends/cached_db.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #22634 -- Made the database-backed session ↵Sergey Kolosov2015-08-271-9/+6
| | | | | | | | backends more extensible. Introduced an AbstractBaseSession model and hooks providing the option of overriding the model class used by the session store and the session store class used by the model.
* Fixed #19324 -- Avoided creating a session record when ↵Carl Meyer2015-07-081-2/+2
| | | | | | | | | loading the session. The session record is now only created if/when the session is modified. This prevents a potential DoS via creation of many empty session records. This is a security fix; disclosure to follow shortly.
* Fixed incorrect session.flush() in cached_db session ↵Tim Graham2015-05-201-1/+1
| | | | | | | | backend. This is a security fix; disclosure to follow shortly. Thanks Sam Cooke for the report and draft patch.
* Removed unnecessary arguments in .get method callsPiotr Jakimiak2015-05-131-1/+1
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-1/+1
|
* Fixed #20936 -- When logging out/ending a session, don't ↵Matt Robenolt2014-05-121-1/+1
| | | | | | | | | | | | | create a new, empty session. Previously, when logging out, the existing session was overwritten by a new sessionid instead of deleting the session altogether. This behavior added overhead by creating a new session record in whichever backend was in use: db, cache, etc. This extra session is unnecessary at the time since no session data is meant to be preserved when explicitly logging out.
* Fixed #21012 -- New API to access cache backends.Curtis Maloney2013-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.
* Fixed #21000 -- Made cached_db session backend respect ↵CHI Cheng2013-09-051-6/+8
| | | | SESSION_CACHE_ALIAS
* Fixed #19866 -- Added security logger and return 400 for ↵Preston Holmes2013-05-261-1/+8
| | | | | | | | | | | | SuspiciousOperation. SuspiciousOperations have been differentiated into subclasses, and are now logged to a 'django.security.*' logger. SuspiciousOperations that reach django.core.handlers.base.BaseHandler will now return a 400 instead of a 500. Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft for review.
* Added optional kwargs to get_expiry_age/date.Aymeric Augustin2012-10-271-1/+1
| | | | | | | | | | | This change allows for cleaner tests: we can test the exact output. Refs #18194: this change makes it possible to compute session expiry dates at times other than when the session is saved. Fixed #18458: the existence of the `modification` kwarg implies that you must pass it to get_expiry_age/date if you call these functions outside of a short request - response cycle (the intended use case).
* Fixed #19200 -- Session expiry with cached_dbAymeric Augustin2012-10-271-4/+21
| | | | Also did a little bit of cleanup.
* Fixed #17810 (again). Catch session key errors.Aymeric Augustin2012-03-231-4/+3
| | | | | | | | | | The previous commit didn't work with PyLibMC. This solution appears to be the best compromise at this point in the 1.4 release cycle. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17797 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed an incompatibility with Python 2.5 in the changes ↵Jannis Leidel2012-03-231-1/+2
| | | | | | done in r17795. Refs #17810. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17810. Catch session key errors.Paul McMillan2012-03-231-1/+7
| | | | | | | | | | | | | Catches memcached session key errors related to overly long session keys. This is a long-standing bug, but severity was exacerbated by the addition of cookie-backed session storage, which generates long session values. If an installation switched from cookie-backed session store to memcached, users would not be able to log in because of the server error from overly long memcached keys. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17795 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Optimized the cached_db session backend to check if a ↵Aymeric Augustin2011-11-271-0/+2
| | | | | | key exists in the cache first. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11555 -- Made SessionBase.session_key read-only. ↵Aymeric Augustin2011-11-271-6/+12
| | | | | | | | | | Cleaned up code slightly. Refs #13478. This also removes the implicit initialization of the session key on the first access in favor of explicit initialization. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17155 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Corrected an issue which could allow attackers to ↵Russell Keith-Magee2011-09-101-5/+9
| | | | | | manipulate session data using the cache. A security announcement will be made shortly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6791: added a write-through cache session ↵Jacob Kaplan-Moss2009-01-101-0/+42
backend: session data is written through the cache to the database, but read from the cache for speed. Thanks to jhenry, mcroydon, and jdunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9727 bcc190cf-cafb-0310-a4f2-bffc1f526a37