Fixed incorrect session.flush() in cached_db session backend.

This is a security fix; disclosure to follow shortly.

Thanks Sam Cooke for the report and draft patch.
This commit is contained in:
Tim Graham 2015-05-11 09:58:43 -04:00
parent be67400b47
commit 088579638b
3 changed files with 19 additions and 2 deletions

View file

@ -165,6 +165,7 @@ class SessionTestsMixin(object):
self.session.flush()
self.assertFalse(self.session.exists(prev_key))
self.assertNotEqual(self.session.session_key, prev_key)
self.assertIsNone(self.session.session_key)
self.assertTrue(self.session.modified)
self.assertTrue(self.session.accessed)