summaryrefslogtreecommitdiff
path: root/django/contrib/sessions/backends/cache.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-8/+12
|
* Fixed #28167 -- Fixed cache backend's SessionStore.exists() if session_key ↵Tim Graham2017-05-031-1/+1
| | | | is None.
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-1/+1
|
* Refs #23919 -- Removed most of remaining six usageClaude Paroz2017-01-181-1/+0
| | | | Thanks Tim Graham for the review.
* Refs #21608 -- Fixed incorrect cache key in cache session backend's save().Jon Dufresne2016-04-041-1/+1
| | | | The bug was introduced commit 3389c5ea229884a1943873fe7e7ffc2800cefc22.
* Fixed #21608 -- Prevented logged out sessions being resurrected by ↵Tore Lundqvist2016-02-261-2/+6
| | | | | | concurrent requests. Thanks Simon Charette for the review.
* Fixed #22634 -- Made the database-backed session backends more extensible.Sergey Kolosov2015-08-271-3/+5
| | | | | | 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 loading the session.Carl Meyer2015-07-081-2/+4
| | | | | | | 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.
* 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 #23812 -- Changed django.utils.six.moves.xrange imports to rangeMichael Hall2014-12-131-2/+2
|
* 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 #17083 -- Allowed sessions to use non-default cache.Aymeric Augustin2012-10-311-2/+3
|
* Fixed #14093 -- Improved error message in the cache session backend.Aymeric Augustin2012-10-281-1/+3
| | | | Thanks stumbles for the patch.
* Fixed #18194 -- Expiration of file-based sessionsAymeric Augustin2012-10-281-0/+4
| | | | | | | * Prevented stale session files from being loaded * Added removal of stale session files in django-admin.py clearsessions Thanks ej for the report, crodjer and Elvard for their inputs.
* [py3] Added Python 3 compatibility for xrange.Aymeric Augustin2012-07-221-0/+1
|
* 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 done in r17795. Refs ↵Jannis Leidel2012-03-231-1/+2
| | | | | | #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
* Fixed #11555 -- Made SessionBase.session_key read-only. Cleaned up code ↵Aymeric Augustin2011-11-271-7/+11
| | | | | | | | | | 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 manipulate session data ↵Russell Keith-Magee2011-09-101-4/+6
| | | | | | 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
* Replaced `has_key()` calls with `in` to ease Python 3 port. Thanks, Martin ↵Jannis Leidel2011-09-091-3/+1
| | | | | | von Löwis. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9548 -- Correctly detect existence of empty sessions with cache backend.Malcolm Tredinnick2009-03-011-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@9934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8311 -- Avoid an infinite loop with session key generation when usingMalcolm Tredinnick2008-08-271-1/+7
| | | | | | | the cache backend and memcached goes away (or is not running). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8351 -- Fixed the returned value when we attempt to load a ↵Malcolm Tredinnick2008-08-161-0/+1
| | | | | | cache-backed session object that doesn't alreayd exist. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Made a few small tweaks to reduce persistent storage accesses in the sessionMalcolm Tredinnick2008-08-151-0/+2
| | | | | | | backend. Refs #8311, although doesn't fix the problem there. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8314 -- Fixed an infinite loop caused when submitting a session key (viaMalcolm Tredinnick2008-08-141-1/+2
| | | | | | | | | | 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
* Implemented a flush() method on sessions that cleans out the session andMalcolm Tredinnick2008-08-141-1/+3
| | | | | | | | | | regenerates the key. Used to ensure the caller gets a fresh session at logout, for example. Based on a patch from mrts. Refs #7515. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added guaranteed atomic creation of new session objects. Slightly backwardsMalcolm Tredinnick2008-08-141-4/+23
| | | | | | | | | | | | | incompatible for custom session backends. Whilst we were in the neighbourhood, use a larger range of session key values to save a small amount of time and use the hardware-base random numbers where available (transparently falls back to pseudo-RNG otherwise). Fixed #1080 git-svn-id: http://code.djangoproject.com/svn/django/trunk@8340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7847 -- Removed a whole bunch of unused imports from throughout the ↵Adrian Holovaty2008-07-221-2/+0
| | | | | | codebase. Thanks, julien git-svn-id: http://code.djangoproject.com/svn/django/trunk@8046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Several Django styling fixes in the `contrib.sessions` app.Gary Wilson Jr2008-06-231-1/+2
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@7725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #2548: added get/set_expiry methods to session objects. Thanks, Amit ↵Jacob Kaplan-Moss2008-06-071-4/+4
| | | | | | Upadhyay and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #2066: session data can now be stored in the cache or on the ↵Jacob Kaplan-Moss2007-09-151-0/+26
filesystem. This should be fully backwards-compatible (the database cache store is still the default). A big thanks to John D'Agostino for the bulk of this code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6333 bcc190cf-cafb-0310-a4f2-bffc1f526a37